如何将C#中的url拆分为键值对
本文关键字:拆分 键值对 url 中的 | 更新日期: 2023-09-27 18:20:42
我有一个Url:
https://www.facebook.com/video.php?v=10154500552625464
我需要将其拆分为一个键值对:
价值:https://www.facebook.com/video.php?v=10154500552625464密钥:10154500552625464
我需要把它们放在字典里:
static Dictionary<string, string> GetVideoLinks(string Data)
{
Regex pattern = new Regex (@"https:'/'/www'.facebook'.com'/video.php'?v=?<id>[0-9]{17}");
return ret;
}
有一个框架类:HttpUtility.ParseQueryString