Last active
August 29, 2015 14:16
-
-
Save ephbaum/298d53914d546b890449 to your computer and use it in GitHub Desktop.
typicalValidEmailFormatRegExp
This file contains hidden or 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
var typicalValidEmailFormatRegExp = /(^[\S]+@[\S]+\.[\S]{2,63}$)/; // @fskirschbaum || My RegExp could beat up your RegExp. Fight Me. || Says, essentialy, a bunch of characters, an @ symbol, a bunch more characters, a single dot, ends with a group of characters between 2 and 63 (the allowed min/max size of valid .tld ). Allows a hefty chunk of expected valid email addresses, disallows most typical user error type input of invalid email address. boom. | |
if ( ___VAR___.match( typicalValidEmailFormatRegExp ) === null ) { return false; } | |
// see example here: @link https://regex101.com/r/vD9zK7/4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment