Regex reg = new Regex(@"(?is)<a[^>]*?href=(['""]?)(?<url>[^'""\s>]+)\1[^>]*>(?<text>(?:(?!</?a\b).)*)</a>");
MatchCollection match = reg.Matches(str);
foreach (Match m in match)
{
string stitle= m.Groups["text"].Value;
string surl = m.Groups["url"].Value;
}
MatchCollection match = reg.Matches(str);
foreach (Match m in match)
{
string stitle= m.Groups["text"].Value;
string surl = m.Groups["url"].Value;
}
谢谢