preg_grep Help (Regular expresion)
| From: | Brian C. Doyle | Date: | Sun, 12 May 2002 00:56:08 +0000 |
| Subject: | preg_grep Help (Regular expresion) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-97188@lists.php.net to get a copy of this message | ||
Hello all,
I have a file that has ip address in it.. I need to pull those ip addresses out.
Currently I am trying:
$ips=preg_grep("/^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/",$file);
print_r(array_values ($ips));
And well i am getting nothing!
Anyone?