gpt-3.5-turbo-0613· OpenAI
WildChat-4.8M (AI2)
C#通过正则表达式提取https://vo1.123188kk.com/20230727/JvvztLv1/hls/key.key中的key.key
- User
- Assistant
可以使用正则表达式来提取该网址中的key.key,代码示例如下:
using System; using System.Text.RegularExpressions; class Program { static void Main() { string url = "https://vo1.123188kk.com/20230727/JvvztLv1/hls/key.key"; string pattern = @"\/([^\/]+)$"; // 匹配最后一个斜杠后的内容 Match match = Regex.Match(url, pattern); if (match.Success) { string key = match.Groups[1].Value; Console.WriteLine(key); // 输出key.key } else { Console.WriteLine("匹配失败"); } } }运行结果为:
key.key