Answers for "regex mail pattern"

2

regex for email

^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$
//will validate for:  [email protected] etc
Posted by: Guest on April-12-2021
1

email regex

function validateEmail(email) {
    const 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,}))$/;
    return re.test(String(email).toLowerCase());
}
Posted by: Guest on January-06-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language