日期:2014-05-18 浏览次数:20386 次
string url="http://forum.csdn.net/PointForum/Forum/PostTopic.aspx?forumID=e2798a59-79d5-4833-9c57-87d46a8b907a"; string[] urlArrays=url.Split('forumID'); string aStr=urlArrays[0];
------解决方案--------------------
System.Text.RegularExpressions.Regex reg=new System.Text.RegularExpressions.Regex("a=([^&]+)");
Uri uri = new Uri("http://www.contoso.com/catalog/shownew.htm?date=today&a=1&b=2");
System.Text.RegularExpressions.Match match= reg.Match(uri.Query);
string a= match.Groups[1].Value;