0
$string='<dt class="comment-author " id="c6290261621627103206">
<a name="c6290261621627103206"></a>
<a href="http://www.google.com">bob</a>
said...
</dt>';
我希望能够检测到标签是否缺少href。我曾尝试过:检测链接没有href
\<a(?!href)(.*?)\<\/a\>
和各种preg_match变化。但遗憾的是无济于事。我要声明,我只是想检测,我不需要从字符串输出和值。
呀想我可以!它的preg_match。谢谢。我陷入了试图检测href的adsense。 – xtremetom 2012-02-21 14:51:46