"' ]+)["']"/> "' ]+)["']">
Home > Backend Development > PHP Tutorial > 正则-php提取页面中域名规则问题!

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-02 11:28:19
Original
1116 people have browsed it

正则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>
Copy after login

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template