日期:2014-05-18 浏览次数:20770 次
<a href="http://as.xxx.com/" onclick="co('as')">鞍山</a><a href="http://ay.xxx.com/" onclick="co('ay')">安阳 ... ... </a>
string s=@"<a href=""http://as.xxx.com/"" onclick=""co('as')"">鞍山</a><a href=""http://ay.xxx.com/"" onclick=""co('ay')"">安阳 ... ... </a>"; MatchCollection matches = Regex.Matches(s, @"(?is)(?<=onclick=""co\(')[^']+(?='\))"); foreach (Match match in matches) Response.Write(match.Value + "<br/>");
------解决方案--------------------
(?<=co\(')[^']+(?='\))