RES: email address syntax checker

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Donovan:

Try this

function EmailCheck ( $sEmail )
 {
 
$regexp="/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z
]{2,}$/i";

     if ( !preg_match($regexp, $sEmail) )
        return false;

     return true;
 }

Alejandro M.S.
-----Mensagem original-----
De: Donovan Brooke [mailto:lists@xxxxxxx] 
Enviada em: quinta-feira, 20 de janeiro de 2011 01:14
Para: php-general@xxxxxxxxxxxxx
Assunto:  email address syntax checker

Hi Guys,

I'm waddling my way through database interaction and thought someone on 
the list may already have a simple email checker that they'd like to 
share...

you know, looking for the @ char and dots etc..

I did a quick search of the archives and found a couple elaborate 
things.. but
I'm looking for something simple. This job will have trusted users and
the checker is more to help them catch mistakes when registering.

Thanks!,
Donovan


-- 
D Brooke

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux