public static string NoHTML(string Htmlstring) { //删除脚本 Htmlstring = Htmlstring.Replace("\r\n", ""); Htmlstring = Regex.Replace(Htmlstring, @"", "", RegexOptions.IgnoreCase); Htmlstring = Regex.Replace(Htmlstring, @" ", "", RegexOptions.IgnoreCase); Htmlstring = Regex.Replace(Htmlstring, @"<.*?>", "", RegexOptions.IgnoreCase); //删除HTML //– Htmlstring = Regex.Replace(Htmlstring, @"<(.[^>]*)>", "", RegexOptions.IgnoreCase); Htmlstring = Regex.Replace(Htmlstring, @"([\r\n])[\s]+", "", RegexOptions.IgnoreCase); Htmlstring = Regex.Replace(Htmlstring, @"–", "-", RegexOptions.IgnoreCase);//1 Htmlstring = Regex.Replace(Htmlstring, @"“", "", RegexOptions.IgnoreCase);//2 Htmlstring = Regex.Replace(Htmlstring, @"”", "", RegexOptions.IgnoreCase);//3增加了3个替换 Htmlstring = Regex.Replace(Htmlstring, @"-->", "", RegexOptions.IgnoreCase); Htmlstring = Regex.Replace(Htmlstring, @"