例如:
<img src="http://topic.csdn.net/ui/images/logo_csdn.gif" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true;......>
正则后变成
<img src="http://topic.csdn.net/ui/images/logo_csdn.gif" border="0">
就是把border=后面的部分全去掉,然后加上"0">
<img src="http://topic.csdn.net/ui/images/logo_csdn.gif" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true;......>
正则后变成
<img src="http://topic.csdn.net/ui/images/logo_csdn.gif" border="0">
就是把border=后面的部分全去掉,然后加上"0">
解决方案 »
- C# winform连接mysql字符转换
- 一个貌似TEXTBOX控件,后面带三个点,点击那三个点弹出一个窗口
- 如何使整数后面加0
- Write a "Send To" menu class in c# ~~this question is sent with a high importance ~~wait online~~
- 怎么打包DIVX的DLL文件,免得用户再安装
- DataGrid更刷新的问题。
- 聊天工具放到别人的机器上就连接不到服务器了
- webbrowse控件里面,更新加载的新的页面代码
- 关于明华读卡器,C#开发,修改密码问题
- 请教方法隐藏(new)和方法重载(overide)的区别?
- 关于正则表达式
- 文件夹的读写权限问题
System.Text.RegularExpressions.Regex regex = new System.Text.RegularExpressions.Regex(@" onload *= *[\s\S]*>", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
string ret = regex.Replace(str, @">");
Htmlstring = Regex.Replace(Htmlstring, "<img[^>].*>", newValue, RegexOptions.IgnoreCase);