There are an amazing amount of regex examples out there (and I'm going ot offer one more below) but from my research what I have learned is that generally the more complicated the expression the better chance of false positives or the other way around.
What I have found to work best for me is a fairly small expression along with the PHP function: checkdnsrr() which is extreamly usefull in this situation.
function is_valid_email_address($email) {
if (preg_match("/.+@.+\..+./", $email)) {
list($username, $domain)=split('@',$email);
if(!checkdnsrr($domain, 'MX')) {
return false;
}
return true;
}
return false;
}
... just another example of email address verification. The nice thing about this is it actually checks if MX records exist for the domain given.