Created
March 29, 2017 14:25
-
-
Save basilalex/8390108ab5e260e456da6b1ed5549f9f to your computer and use it in GitHub Desktop.
RegExp for email check.
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
function checkEmail(email) { | |
const reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; | |
(!reg.test(email)) ? return false : return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment