Hmm... That regexp looks broken, i.e. it doesn't work in valid situations (as others already told you).
I use something like:
... for simple checks. This just requires to have something 'legal' in front of the '@', a basic check for valid chars in the domain name (A-Z0-9 + underscore, except first and last character can not be an underscore), and then 2-4 chars for the tld. This doesn't really catch all invalid situations, but if you would really want to do that, you might as well resolve the mx/a records for the domain given to check if it exists, and then even try to do a VRFY/EXP check on the mailserver. I'm just saying, if people want to give a fake address, they will, even if it's just that of someone else :)/^[a-z0-9-_.]+@[a-z0-9-.]*[a-z0-9]\.[a-z]{2,4}$/i
wouter
In reply to Re: Regex Unexplained Failure
by december
in thread Regex Unexplained Failure
by Flame
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |