Re: Check mail format

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

 



I wrote:
if (eregi("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$]", $Email))

but the PHP always recognized the e-mail address as right! Why?


"Ignatius Reilly" <ignatius.reilly@free.fr> ha scritto nel messaggio
01eb01c394b4$e86149e0$0100a8c0@server">news:01eb01c394b4$e86149e0$0100a8c0@server...
> You can use the following regex:
>
> /^.+@.+\\..+$/
>
> Ignatius
> _________________________
> ----- Original Message -----
> From: "MeAndI" <sebabert@libero.it>
> To: <php-windows@lists.php.net>
> Sent: Friday, October 17, 2003 2:51 PM
> Subject:  Check mail format
>
>
> > Hi,
> >
> > I just want to know how I can recognize that the e-mail address inserted
> by
> > the user is correct or not.
> >
> > E.g.
> > user@server.com -> correct e-mail address
> > user@server or user-server.com -> incorrect email addresses
> >
> > please help
> > Thanks
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >

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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux