"' ]+)["']"/> "' ]+)["']">

Home  >  Article  >  Backend Development  >  正则-php提取页面中域名规则问题!

正则-php提取页面中域名规则问题!

WBOY
WBOYOriginal
2016-06-02 11:28:191059browse

正则php

一套程序中需要在指定的URL页面中提取里面所有的域名,现代码如下:

<code>  $CODE = ......;//这里是获取远程的URL内容        $temp = "/<a>/i";        preg_match_all( $temp, $CODE, $Jzz_thlld );        $Jzz_thlld = $Jzz_thlld[0];        $temp = "/ href=[\"']?http:\\/\\/www\\.([^>\"' ]+)[\"']?\\s*[^>]*>(.*)/si"; for ($dos_skipping = 0; $dos_skipping </a></code>

上述代码中不能按照需求获取到所需要的信息,忘各位帮忙看看,改如何修改!!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn