I have a string and I want to retrieve all e-mails contained in that string.
I can get the @domain.com part with this code:
preg_match_all('{@(([^ ]*)\.com)}', $string, $matches);
print_r($matches[1]);
What I want to get is:
name@domain.com
I used this to make the PHP work: getting emails out of string - regex syntax + preg_match_all