Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想获取 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。