Regex reg=new Regex(@"<img\s+src=[""|'']?(.*?[^:])[""|'']?.*?>",RegexOptions.IgnoreCase);
解决方案 »
- 【求助】ListView如何调样式???
- asp.net SqlCommand 调用Sql Server存储过程返回值正确,但数据未修改....
- winserver2003怎样安装消息队列服务
- Repeater 页面显示问题。
- 关于远程桌面
- 用CSS控制FireFox的折行问题
- GridView如何给linkbutton绑定基于该行key的链接?
- 谁能介绍本关于DataGrid的好书?顶者有分。
- 高分求例子!!!数据库的
- 关于VS和IIS的权限问题。
- 自创建的C#类库项目里怎么引用session
- 请教大家一个 <img src='<%#Eval("img")%>' border="0" width="80px" />的问题。
Regex reg=new Regex(@"<img\s+src=[""|'']?(.*?[^:])[""|'']?.*?>",RegexOptions.IgnoreCase);
http://topic.csdn.net/u/20071030/14/0ad69b0a-3244-4336-aa33-d1c657a3d888.html?seed=410965735
web居然写本地地址。估计就是发现这样不对,才要正则来替换的。
Regex regExp = new Regex(@"(?is)(?<=<img.+?src[^=]*=[^"]*")[a-z]:[^"]+", RegexOptions.Compiled);
//或
//Regex regExp = new Regex(@"(?is)(?<=src[^=]*=[^"]*")[a-z]:[^"]+", RegexOptions.Compiled);
MatchCollection mc = regExp.Matches(html);
foreach(Match m in mc)
{
m.Value;
}