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)
        {
        }
    }
相關文章
相關標籤/搜索