标签:
// 匹配
List srcList = new List();
List linkList = new List();
// 匹配js文件
string pattern = "
MatchCollection mcs = Regex.Matches(html, pattern, RegexOptions.IgnoreCase);
foreach (Match m in mcs)
{
srcList.Add(m.Groups[1].Value);
}
// 匹配css
string patternCss = "]*?href=\"([^>]*?)\"[^>]*?>";
mcs = Regex.Matches(html, patternCss, RegexOptions.IgnoreCase);
foreach (Match m in mcs)
{
linkList.Add(m.Groups[1].Value);
}
标签:
来源: https://www.cnblogs.com/lldbj/p/10243445.html