网络编程 
首页 > 网络编程 > 浏览文章

asp.net 过滤图片标签的正则

(编辑:jimmy 日期: 2025/7/7 浏览:3 次 )
复制代码 代码如下:
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;
}
上一篇:ASP.NET Session会导致的性能问题
下一篇:asp.net Linq To Xml上手Descendants、Elements遍历节点
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网 网站地图 SiteMap