Home >Backend Development >PHP Tutorial > ip正则婚配 - php

ip正则婚配 - php

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 13:04:14946browse

ip正则匹配 - php

preg_match_all ("#(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) (\d{1,4})#",
                $str, $phones);
$arr = array_unique($phones);
foreach($arr[0] as $v){
    $v = str_replace(' ',':', $v);
    echo $v .  "\n";
?

?

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