public string DealHtml(string str)
{
//str = RegexReplace(str @\<(img)[^>]*>|<\/(img)> RegexOptionsIgnoreCase);
str = RegexReplace(str @\<(table|tbody|tr|td|th)[^>]*>|<\/(table|tbody|tr|td|th)> RegexOptionsIgnoreCase);
str = RegexReplace(str @\<(div|blockquote|fieldset|legend)[^>]*>|<\/(div|blockquote|fieldset|legend)> RegexOptionsIgnoreCase);
//str = RegexReplace(str @\<(font|i|u|h[]|s)[^>]*>|<\/(font|i|u|h[]|s)> RegexOptionsIgnoreCase);
//str = RegexReplace(str @\<(style|strong)[^>]*>|<\/(style|strong)> RegexOptionsIgnoreCase);
//str = RegexReplace(str @\<a[^>]*>|<\/a> RegexOptionsIgnoreCase);
//str = RegexReplace(str @\<(meta|iframe|frame|span|tbody|layer)[^>]*>|<\/(iframe|frame|meta|span|tbody|layer)> RegexOptionsIgnoreCase);
str = RegexReplace(str @\<br[^>]* RegexOptionsIgnoreCase);
str = strReplace(<br> );
return str;
}
From:http://tw.wingwit.com/Article/program/net/201311/13195.html