innhyul

Between tomorrow's dream and yesterday's regret is todays opportunity.

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

// 除去所有在html元素中标记
    using System.Text.RegularExpressions;

    public static string striphtml(string strhtml)
    {
        string stroutput = strhtml;
        Regex regex = new Regex(@"<[^>]+>|</[^>]+>");

        stroutput = regex.Replace(stroutput, "");
        return stroutput;
    }

posted on 2010-05-13 22:18  bufferi  阅读(226)  评论(0编辑  收藏  举报