Created: June/2009
isEmail() function in PHP
A basic regular expression using preg_match()
to
check for the validity of an email address.
Source:
<?php
function isEmail($email) {
return preg_match('|^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]{2,})+$|i', $email);
};