Skip to content

Instantly share code, notes, and snippets.

@ndeto
Created October 22, 2017 19:06
Show Gist options
  • Save ndeto/74b4aebf283501806d882053d38d1db2 to your computer and use it in GitHub Desktop.
Save ndeto/74b4aebf283501806d882053d38d1db2 to your computer and use it in GitHub Desktop.
Email validation Regex
function validateEmail(email) {
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
if (email.match(re)) {
return true;
} else {
return false;
}
}
@ndeto
Copy link
Author

ndeto commented Apr 15, 2020

Checking

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