I have this function which will validate an email address. jsLint gives an error with the regular expression complaining about some of the characters being un-escaped.
Is there a way to correctly escape them?
var validateEmail = function(elementValue){
var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
return emailPattern.test(elementValue);
};