博客已迁到“金陵小周的技术博客”,博客园不在更新发表......

C#过滤Html标签及空格

1 public static string FilterHTML(string HTMLStr)
2         {
3             if (!string.IsNullOrEmpty(HTMLStr))
4                 return System.Text.RegularExpressions.Regex.Replace(HTMLStr, "<[^>]*>|&nbsp;", "");
5             else
6                 return "";
7         }

 

posted @ 2015-11-02 10:11  Pete-Jones  阅读(1478)  评论(0编辑  收藏  举报

博客已迁到“金陵小周的技术博客”,博客园不在更新发表......