日期:2014-05-18  浏览次数:20519 次

一个正则表达 的问题,大哥些help
Regex reg = new Regex(strReg, RegexOptions.Multiline);
  MatchCollection collection = reg.Matches(content);


下面是content 我只想要"><A href='/cqzxlt~-1~12/13236747_13236747.htm' 内容中所有的cqzxlt~-1~12/13236747_13236747.htm 的正则  
这个正则strReg 怎么写 请教一下!!


</div>
</td></tr></table><table class="t_0" style="TABLE-LAYOUT:fixed"><tr><td>
<div class="t_0" style='padding-left:25'><img src="http://img2.soufun.com/bbs/image/bbs/face/002.gif"><A href='/cqzxlt~2007~12/13236749_13236756.htm' target="_blank" ><font color=#ff0000>的确,我深有体会,要做到滴水不漏还是要下功夫的哟</font></A><font color='black'>[<a href="http://homebbs.cq.soufun.com/board/023_cqzxlt/2007_1"><font color=black>装修问答</font></a>]</font>-&lt;0字节&gt;&nbsp;<a href=http://blog.soufun.com/blog_10236489.htm target=_blank title=点击进入会员博客>黑白灰装饰</a><a href='http://passport.soufun.com/Message.Web/MessageEdit.aspx?action=New&touser=%ba%da%b0%d7%bb%d2%d7%b0%ca%ce' target=_blank><img src='http://img2.soufun.com/bbs/image/bbs/face/speaker.gif' alt='给黑白灰装饰发个短消息' border=0></a><span id="s_10236489" name="s_10236489"></span>&nbsp;10-15 22:53(10次点击)
</div>
</td></tr></table><table class="t_0" style="TABLE-LAYOUT:fixed"><tr><td>
<div class="t_0" style='padding-left:0'><hr size=1 color=#D2E9FF ><img src="http://img2.soufun.com/bbs/image/bbs/face/002.gif"><A href='/cqzxlt~-1~12/13236747_13236747.htm' target="_blank" ><font color=#000000>哪里有性价比较高的水晶灯卖,请高手指点</font></A><font color='black'>[<a href="http://homebbs.cq.soufun.com/board/023_cqzxlt/-1_1"><font color=black>装修论坛</font></a>]</font>-&lt;0字节&gt;&nbsp;<a href=http://blog.soufun.com/blog_10188715.htm target=_blank title=点击进入会员博客>cqsl123</a><a href='http://passport.soufun.com/Message.Web/MessageEdit.aspx?action=New&touser=cqsl123' target=_blank><img src='http://img2.soufun.com/bbs/image/bbs/face/speaker.gif' alt='给cqsl123发个短消息' border=0></a><span id="s_10188715" name="s_10188715"></span>&nbsp;10-15 22:41(<font color=red>79</font>次点击)<img src=http://img2.soufun.com/bbs/image/bbs/face/hotPs.gif>
</div>
</td></tr></table><table class="t_0" style="TABLE-LAYOUT:fixed"><tr><td>
<div class="t_0" style='padding-left:25'><img src="http://img2.soufun.com/bbs/image/bbs/face/002.gif"><A href='/cqzxlt~-1~12/13236747_13236795.htm' target="_blank" ><font color=#000000>Re:同意楼上</font></A><font color='black'>[<a href="http://homebbs.cq.soufun.com/board/023_cqzxlt/-1_1"><font color=black>装修论坛</font></a>]</font>-&lt;0字节&gt;&nbsp;<a href=http://blog.soufun.com/blog_11997898.htm target=_blank title=点击进入会员博客>千节</a><a href='http://passport.soufun.com/Message.Web/MessageEdit.aspx?action=New&touser=%c7%a7%bd%da' target=_blank><img src='http://img2.soufun.com/bbs/image/bbs/face/speaker.gif' alt='给千节发个短消息' border=0></a><span id="s_11997898" name="s_11997898"></span>&nbsp;10-16 01:15(5次点击)
</div>

------解决方案--------------------
试试这个
@"/[^<^>^\s]*?[^\s]*?\.(htm)|(html)"