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

 

相关文章:

  • 2021-06-18
  • 2022-12-23
  • 2021-10-24
  • 2022-12-23
  • 2021-10-07
  • 2021-08-30
  • 2022-12-23
  • 2022-01-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
  • 2022-12-23
  • 2022-12-23
  • 2021-08-17
相关资源
相似解决方案