VocabReminder
Easily build a great vocabulary without studying! Now on the App Store!
Click here for more info about the app

Matching email addresses in Javascript

       

Matching email addresses in Javascript

regex = /\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}\b/img
"hello sean@example.com how are you? do you know bob@example.com?".match(regex)
// => ["sean@example.com", "bob@example.com"]
Tagged w/ #javascript #regex #email #snippets