我已经得到远程的页面内容,现在想通过正则得到想用的内容<img style="CURSOR: pointer" onclick='javascript:add("6108","tt","http://www.abc.cn/s58.html","http://img.abc.com.cn/714.JPG","59");' src="http://www.273.cn/themes/default/images/ico_compare.gif" align="absmiddle">页面上有多处这种格式的html代码,我现在想得到onclick里的这个网址http://www.abc.cn/s58.html这个正则该如何写?
解决方案 »
- [高分:投票+讨论]Entity Framework + Oracle VS nHibernate + Oracle
- mvcweb的配置连接串的问题
- 动态设置Panel的大小
- 在ASP.NET的验证控键中求两个正则表达式
- 无法将类型为“System.DBNull”的对象强制转换为类型“System.String”。
- 关于gridview 大侠进 在线等
- 我的用的是动软的 .net代码生成器,出现了错误 当 IDENTITY_INSERT 设置为 OFF 时,请指点一下,大家都是这么做的啊
- 大家觉得ASP。NET权威指南写的和译的怎么样
- 确实不明白,帮我看看
- 编辑功能用ajax?
- 在asp.net 1.1中如何使用“步步为赢气泡验证控件(Winsteps.Validator) ”谢谢!
- 有什么方法不用修改具体的功能页面,解决SQL注入问题.比如有一个全局的修改解决SQL注入?
Regex re = new Regex("([\\s|.]*)\",\"(?<aa>(.+))\",([\\s|.]*)");
System.Text.RegularExpressions.Match math = re.Match(str1);
while (math.Success)
{
str1 = math.Groups["aa"].Value;
math = re.Match(str1);
} return str1;
正在分析“([\s|.]*)","(? <aa>(.+))",([\s|.]*)”- 无法识别的分组构造。
MatchCollection mc = Regex.Matches(yourStr, @"(?<=onclick='[^']*?)http://[^'""]*?\.html", RegexOptions.IgnoreCase);
foreach (Match m in mc)
{
Response.Write(m.Value + "<br>");
}