Skip to content

Instantly share code, notes, and snippets.

@fiznool
Last active December 18, 2015 00:09
Show Gist options
  • Save fiznool/5694861 to your computer and use it in GitHub Desktop.
Save fiznool/5694861 to your computer and use it in GitHub Desktop.
HTML5 Email validation regex
var EMAIL_REGEX = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,253}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,253}[a-zA-Z0-9])?)*$/;
var isValidEmailAddress = function(email) {
return EMAIL_REGEX.test(email);
};
@fiznool
Copy link
Author

fiznool commented Jun 2, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment