正则表达式匹配 href 和text内容
摘要:string pattern = @"]*href=(""(?[^""]*)""|'(?[^']*)'|(?[^\s>]*))[^>]*>(?[\s\S]*?)"; MatchCollection mcs = Regex.Matches(contenhtml, pattern, RegexOptions.IgnoreCase | RegexOptions.Compiled);href =mcs[0].Groups["href"].Value;text=m
阅读全文
posted @
2014-04-01 11:46
许鸣
阅读(941)
推荐(0) 编辑