比如有如下的内容:

<html>

    <head>

        <title></title>

    </head>

    <body>

    fdfdfds

    </body>

</html>

remained content

 

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

remained content

 

 

答案:

用如下的代码:

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

posted on 2012-02-10 17:25  今夜太冷  阅读(276)  评论(1编辑  收藏  举报