I want to allow _ inside the email.
but the regexp i have just filter this.
html,
<input id="external_email_input" maxlength="85" type="text">
<button id='email'>Send</button>
js,
$("#email").click(function(){
var email = $("#external_email_input").val();
if(!validateEmail(email)){
alert("wrong format!!");
}else{
alert("correct!!");
}
});
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);
}
jsfiddle,
if i put test@test_test.com
it returns false
how can i allow _ as a condition in here?

