email regex javscript

JavaScript
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,}))$/;
    return re.test(String(email).toLowerCase());
}
/* Answer to: "email regex javascript" */

ValidateEmail("[email protected]"); // Must be a string

function ValidateEmail(email) {
	var emailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(String(email).toLowerCase());
	if (email.match(emailformat)) {
    	alert("Nice Email!")
      	return true;
    };
    alert("That's not an email?!")
    return (false);
};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));
# Language: Perl

sub Validate_Email($)
{
   my $sEmail = $_[0];
   my $sRetMsg = "";

   my $sUserNmRegex = "^[[:alnum:]]+([.!#\$\%&'*+-\/=?^_'{|]?[[:alnum:]]+)*";
   my $sDomainRegex = "@[[:alnum:]]+([.-]{1}[[:alnum:]]+)*";
   my $sEndRegex = "([.]{1}[[:alnum:]]+)+";

   #  Work
   #--------#

   if ($sEmail =~ /$sUserNmRegex$sDomainRegex$sEndRegex$/) {
      $sRetMsg = "Email is valid";
   }
   else {
      $sRetMsg = "Email is not valid";
   }

   return $sRetMsg;
}

my $sEmail = '[email protected]';
print "[Email:$sEmail] : " . Validate_Email($sEmail) . "\n";

# OUTPUT -> [Email:[email protected]] : Email is valid
//returns true if valid, false if not valid
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,}))$/;
  return re.test(email);
}
Source

Also in JavaScript: