1、获取div内容

string str = "tt<u>ss</u><div id=\"test\"><div><a>fds</a></div></div>";
        Regex reg = new Regex(@"(?is)<div\s+);
        Match m = reg.Match(str);
        if (m.Success)
        {
            Response.Write(m.Value);
        }

2、获取div内容

string str = "tt<u>ss</u><div id=\"test\"><div><a>fds</a></div></div>";
        Regex reg = new Regex(@"(?is)<div\s*);
        Match m = reg.Match(str);
        if (m.Success)
        {
            Response.Write(m.Value);
        }

 

相关文章:

  • 2022-12-23
  • 2021-09-06
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-17
  • 2021-09-27
  • 2021-07-13
  • 2021-10-13
  • 2022-12-23
  • 2022-01-23
  • 2022-12-23
相关资源
相似解决方案