正则匹配链接内容不为图片的所有锚点
作者:Rady 日期:2010-07-28
要查找的内容:
<a class=”class1” href=”http://www.radys.cn”>正则一</a>
<a href=”http://www.radys.cn” target=”_blank”>正则二a>
<a href=”http://www.radys.cn” style=”color:#ff0”>正则三</a>
<a href=”http://www.radys.cn” rel=”nofollow”>正则四内容</a>
<a title=”内空五” href=”http://www.radys.cn” rel=”nofollow”><img src=”http://www.radys.cn/logo.jpg” alt=”logo”/></a>
正则表达式(C#)
<a(.+?)href="([^>]+?)"([^>]*?)>(((?!<img).)*?)</a>
评论: 0 | 查看次数: 146
发表评论
上一篇
下一篇
文章来自:
Tags: 





