日期:2014-05-18 浏览次数:20494 次
string s = @"<$if:classid value=""640518574713""><$if:name value=""333"">";
MatchCollection matches = Regex.Matches(s, @"(?is)<\$if:(?<name>classid|name)\s+value=""(?<value>.*?)"">");
foreach (Match match in matches)
{
Response.Write(match.Groups["name"].Value + "<br/>");
Response.Write(match.Groups["value"].Value + "<br/>");
}