public static string CHEO(string html)
{
string stringPattern = @"</?(?(?= a|img|br|iframe|object|embed|param|tbody|td|tr|table| @)notag|[a-zA-Z0-9]+)(?:\s[a-zA-Z0-9\-]+=?(?:(["",']?).*?\1?)?)*\s*/?>";
html = Regex.Replace(html, stringPattern, "");
return html;
{
string stringPattern = @"</?(?(?= a|img|br|iframe|object|embed|param|tbody|td|tr|table| @)notag|[a-zA-Z0-9]+)(?:\s[a-zA-Z0-9\-]+=?(?:(["",']?).*?\1?)?)*\s*/?>";
html = Regex.Replace(html, stringPattern, "");
return html;
}
红色区域添加要保留的标签,多个用 | 分开