We have a set RegEx that we follow for validating emails, which works pretty well. Though we recently discovered if an email address has a dot(.) in it, the RegEx validation will fail if the number of characters after the dot(.) are less than 3. For example:
test.abcd@gmail.com
-> PASStest.abc@gmail.com
-> PASStest.ab@gmail.com
-> FAILtest.a@gmail.com
-> FAIL
Here is the RegEx:
/^[-a-z0-9#$%^&'`?{}_=+\/}{\'?]+(\.[-a-z0-9#$%^&'`?{}_=+\/}{\'?]+([a-zA-Z]{2,4})+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$/i