Hello all.
I have a plain text file which contains (amongst other things) a number of email addresses.
I want to extract these addresses out of this text file and into an array for future use (eventually creating a CSV list).
I've tried using the following regexp with the eregi function to grab the addresses:
[a-z0-9-]+(.[a-z0-9-]+)@[a-z0-9-]+(.[a-z0-9-]+)
however this only extracts the first address from the file.
If I use preg_match_all then I get the following error:
Warning: Unknown modifier '+' in C:\httpd\HTDOCS\emails.php on line 23
Any ideas as to how I can get all the addresses out of the file?
(FYI, I'm using PHP 4.0.4pl1, with PCRE enabled and version 3.1 of the PCRE library.)
Thanks in advance!
Regards,
Nathan Pace.