Hi all, I'm trying to learn regexes but they look really spooky to me at this point Never worked with them before. What I'm trying to get done is to have a regex check a page I obtained through file_get_contents() to check for IP Address
ort occurances. E.g. 81.52.102.63:1044.
I tried this but without luck.
$content = file_get_contents('myfile.php');
$search = ereg('[0-9]{3}.[0-9]{3}.[0-9]{3}.[0-9]{3}:[0-9]{5}',$content,$match);
foreach ($match as $result) {
echo $result . "<br>\n";
}
But as you guessed this is not working. I just get a "<br>\n" and that's it. I assume it is my noobie regex, any suggestions ?