我想获取 url 的 cid 值,在这种情况下:
"http://www.google.com/products/catalog?hl=en&q=Dee+Zee+8170LB&um=1&ie=UTF-8&tbm=shop&cid=14199285063072465458"
我可以为此使用正则表达式还是有一些更好的方法,除了旧的 IndexOf 字符串修剪。
请您参考如下方法:
您可以尝试使用 HttpUtility.ParseQueryString .
我想获取 url 的 cid 值,在这种情况下:
"http://www.google.com/products/catalog?hl=en&q=Dee+Zee+8170LB&um=1&ie=UTF-8&tbm=shop&cid=14199285063072465458"
我可以为此使用正则表达式还是有一些更好的方法,除了旧的 IndexOf 字符串修剪。
请您参考如下方法:
您可以尝试使用 HttpUtility.ParseQueryString .