Created
May 5, 2014 16:49
-
-
Save argshook/c503b92882398a86da59 to your computer and use it in GitHub Desktop.
regexp for matching a valid email and populating an array with its parts
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
// regexp for matching a valid email and populating an array with its parts | |
'[email protected]'.match(/([a-z|0-9]{2,})+\@([a-z|0-9]+)\.(.{2,})/) // <= ['[email protected]', 'email', 'domain', 'com'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment