-
-
Save Dottenpixel/3df3719bb27c3fe39b14 to your computer and use it in GitHub Desktop.
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-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*)+\@([a-z0-9-]+)\.([a-z.]{2,})/) | |
// returns ['[email protected]', 'e.mail-address', 'my-domain', 'co.us'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment