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";登入後複製 ? ?