反编译html代码

//反编译Html代码
 

   public string HtmlFilter(string html)
    {
        //设置要删除的标记
        string[] lable = { "font", "span", "div", "p" };
        foreach (string lb in lable)
        {
            string reg = String.Format(@"</?{0}[^>]*?>", lb);
            html = Regex.Replace(html, reg, "", RegexOptions.IgnoreCase);
        }
        return html;
    }
posted @ 2012-11-20 13:05  蚂蚁乙  阅读(840)  评论(0编辑  收藏  举报