解决方案 »
- 菜鸟求递归(Tree),求大神踊跃回复
- Is it meaning that I have to install SQL server in this Windows Server?
- 我想把上传到服务器上的foxpro6.0的dbf文件读到datagrid里面,然后再存入数据库,现在不知道要怎么连foxpro啊
- 如何将DropDownList控件和Calendar控件相结合
- 请教一段语句的C#写法
- asp.net工程移到另一台机器上为什么不能加载?
- 如何在httpMondel里面得到页面的值
- 谁帮我把这试卷给做一下呢 每人做一题啊 不要做多
- VS.net的版本到底是怎么定的呀
- 关于.net里面用c#截取字符的方法
- 如何将数据当点击按钮是显示
- 页面跳转并关闭旧页面
我还想说 直接用jquery获取href的内容呢。
MatchCollection matches = Regex.Matches(htmlStr, "(?is)<div\sclass=(['"]?)photo\1>.*?<a\b[^>]*?href=(['"]?)(?<url>[^'"]+)\2[^>]*?>");
string ahtml = "";
foreach (Match match in matches)
{
ahtml += match.Groups["url"].Value + "\r\n";
}取不出来啊 报错了。
取第二个分组,Groups[2].Value
MatchCollection matches = Regex.Matches(htmlStr, @"(?is)<div\sclass=(['""]?)photo\1>.*?<a\b[^>]*?href=(['""]?)(?<url>[^'""]+)\2[^>]*?>");
string ahtml = "";
foreach (Match match in matches)
{
ahtml += match.Groups["url"].Value + "\r\n";
}