<div class="right paging">
<span><span class="pr10">1-20条(共1207条)</span><a href="#" title="上一页" class="prev no"><span></span></a><span class="bold black">1</span> <a href='/detailcmt_cn_30101261_index_2.html'>2</a> <a href='/detailcmt_cn_30101261_index_3.html'>3</a> <a href='/detailcmt_cn_30101261_index_4.html'>4</a> <a href='/detailcmt_cn_30101261_index_5.html'>5</a>...<a href="/detailcmt_cn_30101261_index_61.html" title="最后一页">61</a>,<a href="/detailcmt_cn_30101261_index_2.html" title="下一页" class="next">下一页<span></span></a></span>
</div>使用正则表达式获取...<a href="/detailcmt_cn_30101261_index_61.html" title="最后一页">61</a>下的61.
把<href="/detailcmt_cn_30101261_index_61.html">忽略掉,不要把href="/detailcmt_cn_30101261_index_61.html作为条件也能把61过滤出来。
Regex regx = new Regex(@"表达式", RegexOptions.IgnoreCase); //评论
MatchCollection mc = regx.Matches(html);呼叫高手。,把Demo写出来,小弟刚刚接触这个正则表达式不怎么晓得,谢谢
<span><span class="pr10">1-20条(共1207条)</span><a href="#" title="上一页" class="prev no"><span></span></a><span class="bold black">1</span> <a href='/detailcmt_cn_30101261_index_2.html'>2</a> <a href='/detailcmt_cn_30101261_index_3.html'>3</a> <a href='/detailcmt_cn_30101261_index_4.html'>4</a> <a href='/detailcmt_cn_30101261_index_5.html'>5</a>...<a href="/detailcmt_cn_30101261_index_61.html" title="最后一页">61</a>,<a href="/detailcmt_cn_30101261_index_2.html" title="下一页" class="next">下一页<span></span></a></span>
</div>使用正则表达式获取...<a href="/detailcmt_cn_30101261_index_61.html" title="最后一页">61</a>下的61.
把<href="/detailcmt_cn_30101261_index_61.html">忽略掉,不要把href="/detailcmt_cn_30101261_index_61.html作为条件也能把61过滤出来。
Regex regx = new Regex(@"表达式", RegexOptions.IgnoreCase); //评论
MatchCollection mc = regx.Matches(html);呼叫高手。,把Demo写出来,小弟刚刚接触这个正则表达式不怎么晓得,谢谢
解决方案 »
- aspx对话框内容 问题,谁会
- GridView中的一个显示小问题
- 如何解决服务器被嵌入JS代码
- 请问:如何让Calendar显示周次?谢谢
- .net 的调试
- 关于dataGrid分页,原来是好的,现在不行了,大虾指点一下!
- 我想问一下,在类的前面声名,dim ,private ,protected ....有什么不同,还有。。。。
- 如何在网页中摸拟ie中的“前进”与“后退“!!
- asp中寫Response.cookies ("ITEM1")("SUBA")="Standy"在dotnet(C#)中如何讀出
- 怎样使DataList中的“删除”和“回复”都生效
- 查询语句
- 希望没睡的高手帮帮忙啊 急啊
string pattern = @"(?im)<a[^>]+title[^>]+>(\d+)</a>";
tempStr = Regex.Match(tempStr,pattern).Groups[1].Value;//输出:61