Re: Checking email

From: Date: Sat, 09 Feb 2002 09:33:52 +0000
Subject: Re: Checking email
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-11947@lists.php.net to get a copy of this message
function isEmailInvalid($val) { // regex for email validation $pattern = "/^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/"; // match? if(preg_match($pattern, $val)) { return 0; } else { return 1; } }

« previous php.windows (#11947) next »