In PHP, I use this regex for checking mails:
$rexMail = "/^[a-z0-9\._]+@{1}[a-z0-9-_]+\.{1}[a-z]{2,4}\.?[a-z]{0,2}$/i";
In most cases, this will suffice. However, this mail address turns out to be valid for the regex:
That shouldn't be possible. While multiple points should be allowed before the @ sign, it shouldn't be possible to have multiple ones right after eachother.
I'm not that good with regex and I don't know how to solve this.
Also, I'm not too sure about the amount of dots after the @ sign, for there are such mail addresses as .co.uk, or worst.