Possible Duplicate:
Validate email address in Javascript?
I'm having some trouble with validating email address client side using Javascript. After a lot of searching I found a regular expression which is as follows:-
/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$
It was working fine with most email ids I have tested with. But suddenly I discovered that it's also saying email's with .com.com
like extensions, which is a serious bug for me.
How my question is that how I can modify the mentioned regular expression which will invalid .com.com
also.
I should also mention that i have also tried with many other regular expressions but they all seem to have this same mentioned problem...
Thanks...