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