手机
当前位置:查字典教程网 >编程开发 >asp.net教程 >asp.net 过滤图片标签的正则
asp.net 过滤图片标签的正则
摘要:复制代码代码如下:publicstaticstringreplaceImgUrl(stringhtml){if(html==null)ret...

复制代码 代码如下:

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 过滤图片标签的正则】相关文章:

c#中过滤html的正则表达式

asp图片防盗链的代码

介绍asp.net 操作INI文件的读写

asp.net 操作cookie的实例

asp.net 文章内容分页显示的代码

asp.net 两个不同页面的传值

asp.net创建位图生成验证图片类

asp.net验证码图片生成示例

asp.net 备份和恢复数据库的方法

asp.net中利用ashx实现图片防盗链的原理分析

精品推荐
分类导航