正则表达式匹配 href 和text内容
string pattern = @"<a[^>]*href=(""(?<href>[^""]*)""|'(?<href>[^']*)'|(?<href>[^\s>]*))[^>]*>(?<text>[\s\S]*?)</a>";
MatchCollection mcs = Regex.Matches(contenhtml, pattern, RegexOptions.IgnoreCase | RegexOptions.Compiled);
href =mcs[0].Groups["href"].Value;
text=mcs[0].Groups["text"].Value;