I have to valid email address in JavaScript. My method is
function validateEmail(email)
{
var re = /^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/;
return re.test(email);
}
Issue is that Visual Studio is not accepting the Regular Expression and giving error when i run the application. The error is