Answers for "regex for email or phone number javascript"

46

javascript regex email

function validateEmail (emailAdress)
{
  let regexEmail = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
  if (emailAdress.match(regexEmail)) {
    return true; 
  } else {
    return false; 
  }
}

let emailAdress = "[email protected]";
console.log(validateEmail(emailAdress));
Posted by: Guest on March-26-2020
5

js email regex

function isValidEmail(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 May-11-2020
0

avascript regex email

function Validate (InputEmail){
  if (InputEmail.match(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/)) {
    return true; 
  } else {
    return false; 
  }
}

console.log(Validate("[email protected]"));
Posted by: Guest on July-18-2021

Code answers related to "regex for email or phone number javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language