How can I validate the input value is a valid email address using php5. Now I am using this code
function isValidEmail($email){
$pattern = \"^[_a-z0-9
See the notes at http://www.php.net/manual/en/function.ereg.php:
Note:
As of PHP 5.3.0, the regex extension is deprecated in favor of the PCRE extension. Calling this function will issue an E_DEPRECATED notice. See the list of differences for help on converting to PCRE.
Note:
preg_match(), which uses a Perl-compatible regular expression syntax, is often a faster alternative to ereg().