C#遍历正则匹配到的多个结果的代码

直接上代码:html

Regex regex = new Regex(strPattern, RegexOptions.IgnoreCase | RegexOptions.Multiline);
    if (regex.IsMatch(htmlContent))
    {
        MatchCollection matchCollection = regex.Matches(htmlContent);
        foreach (Match match in matchCollection)
        {
        }
    }
相关文章
相关标签/搜索