System.Text.RegularExpressions.Regex reg = new System.Text.RegularExpressions.Regex("eventid=([^&]+)"); System.Text.RegularExpressions.Match match = reg.Match(HttpContext.Current.Request.UrlReferrer.Query); string a = match.Groups[1].Value;原文链接:https://www.f2er.com/regex/361200.html