比如有如下的内容:

<html>

    <head>

        <title></title>

    </head>

    <body>

    fdfdfds

    </body>

</html>

remained content

 

用正则表达式替换后,如何才能只剩下:

remained content

 

 

答案:

用如下的代码:

result = Regex.Replace(result, "<html>(<|>|.|\\n)*?</html>", "");

相关文章:

  • 2021-08-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2023-03-20
  • 2021-09-30
猜你喜欢
  • 2022-12-23
  • 2021-08-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案