把开发过程中比较重要的内容片段收藏起来,如下内容是关于C#遍历正则匹配到的多个结果的内容,应该是对大家有一些用处。
Regex regex = new Regex(strPattern, RegexOptions.IgnoreCase | RegexOptions.Multiline);
if (regex.IsMatch(htmlContent))
{
MatchCollection matchCollection = regex.Matches(htmlContent);
foreach (Match match in matchCollection)
{
}
}