Asp.Net过滤一对标签,例如div、ul、p、li、span等
html = “html page”; Regex regPage = new Regex(@"(?is)<div\sclass=""pages"">((?<Open><div>)|(?<-Open></div>)|.*?)*?(?(Open)(?!))</div>", RegexOptions.IgnoreCase); html = regPage.Replace(html, "");
Asp.Net过滤一对标签,例如div、ul、p、li、span等
html = “html page”; Regex regPage = new Regex(@"(?is)<div\sclass=""pages"">((?<Open><div>)|(?<-Open></div>)|.*?)*?(?(Open)(?!))</div>", RegexOptions.IgnoreCase); html = regPage.Replace(html, "");
内容版权声明:除非注明,否则皆为本站原创文章。