【在线满意秒结】正则取以下代码中href=""之间字符串,用php实现?

html代码如下


<a href="http://xx/index.html?m=rect&amp;go=find&amp;id=24&amp;pd=7" target="_blank">

需要用正则获取href="获取这里的内容",谢谢了

https://www.cnblogs.com/zxidong/p/6407305.html



```php
<?php
$html='<a href="http://xx/index.html?m=rect&amp;go=find&amp;id=24&amp;pd=7" target="_blank">';
preg_match_all('/<a .*?href="(.*?)".*?>/i',$html,$href); 
echo $href[1];