过滤HTML
public static string NoHTML(string html)
{
string[] strArray2 = new string[] { "font", "span", "div", "p" };
foreach (string str in strArray2)
{
string pattern = string.Format("</?{0}[^>]*?>", str);
html = Regex.Replace(html, pattern, "", RegexOptions.IgnoreCase);
html = html.Replace(" ", " ");
}
return html;
}
原文地址:http://www.cnblogs.com/upshania/p/3817256.html