日期:2014-05-17 浏览次数:21060 次
Regex re = new Regex(@"<li class=['\""]top-\d['\""]>(?<text>[\s\S]*?)</li>", RegexOptions.None);
MatchCollection mc = re.Matches("text");
foreach (Match ma in mc)
{
}
------解决方案--------------------
这样
MatchCollection mc = Regex.Matches(html, @"<li class=['""]top-"+i.ToString()+@"['""]>(?<text>[\s\S]*?)</li>", RegexOptions.IgnoreCase);