I\'m not too sure how to do this. I need to validate email addresses using regex with something like this:
[a-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$
Try this
function isValidEmailAddress(emailAddress) { var pattern = new RegExp(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/); return pattern.test(emailAddress); };