I got a text: $text = "Blah...
user1@domain1.com ...blah....
user2@domain2.com ...";
How do I get hold of the e-mail addresses:
user1@domain1.com,
user2@domain2.com, ... using regex? How to do it with php?
UPDATE:
Would this be an smart way to do it?
PHP Code:
preg_match_all("/(\w|\.)*@\w*\.\w*/", $text, $match);
$match contains all matches, all e-mail addresses in $text. (I also want to match e-mail addresses like
user1.sub@domain1.com.)
Thanks for any suggestions!