Return to Snippet

Revision: 56190
at March 15, 2012 05:44 by focal55

Initial Code
$content = "Hi my name is Joe, I can be contacted at [email protected]";
preg_match("/[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})/i", $content, $matches);
print $matches[0];

Initial URL

Initial Description
Thank you Jonathan Sampson for posting this on

Initial Title
PHP: Find Email in String

Initial Tags

Initial Language