时间:2021-07-01 10:21:17 帮助过:4人阅读
$url = 'http://www.baidu.com/zongzi/oo.html';
$n = preg_match_all("/http:[\/]{2}[a-z]+[.]{1}[a-z\d\-]+[.]{1}[a-z\d]*[\/]*[A-Za-z\d]*[\/]*[A-Za-z\d]*[.]*html/",$url,$array);
var_dump($array);
?>
http://www.bkjia.com/PHPjc/323946.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/323946.htmlTechArticle 代码如下:
?php $url = 'http://www.baidu.com/zongzi/oo.html'; $n = preg_match_all("/http:[\/]{2}[a-z]+[.]{1}[a-z\d\-]+[.]{1}[a-z\d]*[\/]*[A-Za-z\d]*[\/]*[A-Za-z\d]*...