$subject = '<a ref="aaa" href="http://www.google.com" title=`google`><span>Google</span></a>aaasdf<a href=http://www.baidu.com>111</a>jjjjj';
preg_match_all('/<a[^>]+href=(\"?)([^>]+)\1\s[^>]*>.+<\/a>.*/', $subject,$match);
print_r($match);
我想匹配两个<a>标签的href属性,上面写的有误,请大家帮我检查一下,谢谢了