asp.net 过滤图片标签的正则
时间:2021-10-10 09:12:45|栏目:.NET代码|点击: 次
复制代码 代码如下:
public static string replaceImgUrl(string html)
{
if (html == null)
return "";
System.Text.RegularExpressions.Regex regex = new System.Text.RegularExpressions.Regex(@"\<img[^\>]+\>", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
html = regex.Replace(html, ""); //过滤frameset
return html;
}
上一篇:C#中方括号[]的语法及作用介绍
栏 目:.NET代码
本文标题:asp.net 过滤图片标签的正则
本文地址:http://www.codeinn.net/misctech/179368.html






