I have to modify a script which uses regex to check whether given email is valid or not. Its working fine but failed to validate email like "foo$!@bar.com".
Here is the regex :-
var tester = /^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-?\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;
Can anyone help me in this. Thanks in advance.