Created
August 25, 2014 17:23
-
-
Save jackmcdade/0768caa59ae15cf2888b to your computer and use it in GitHub Desktop.
Parse out email addresses
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function extractEmailAddresses($string) | |
{ | |
preg_match_all("/[\._a-zA-Z0-9-]+@[\._a-zA-Z0-9-]+/i", $string, $matches); | |
return $matches[0]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment