C#遍历正则匹配到的多个结果的代码
作者:互联网
直接上代码:
Regex regex = new Regex(strPattern, RegexOptions.IgnoreCase | RegexOptions.Multiline); if (regex.IsMatch(htmlContent)) { MatchCollection matchCollection = regex.Matches(htmlContent); foreach (Match match in matchCollection) { } }
标签:regex,Regex,遍历,C#,代码,htmlContent,matchCollection,正则,RegexOptions 来源: https://www.cnblogs.com/x00479/p/14147682.html