过滤HTML

过滤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("&nbsp;", " ");
}
return html;
}

 

过滤HTML,布布扣,bubuko.com

过滤HTML

上一篇:db2v8 数据迁移


下一篇:Qt操作数据库中出现的问题