string html = “html代码”; Regex reg = new Regex(@"(?is)<a[^>]*?href=(['""]?)(?<url>[^'""s>]+)1[^>]*>(?<text>(?:(?!</?a).)*)</a>"); MatchCollection mc = reg.Matches(html);foreach (Match m in mc) { string url = m.Groups["url"].Value; string text = m.Groups["text"].Value; }