Re: Regex validation

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

 



Good to know filter_var() exists in PHP5

Unless you have PHP5 you better validate the string in the way of checking
if it is fit's to your allowed characters and not checking if it contains
the NOT allowed charaters.

You better use: [a-z0-9A-Z\_\.]+ instead of [^\)\(\*\&\^\%\$\#\@\!\~]+ and I
haven't started yet with the weirdy ones....

HTH,
Nitsan

On Wed, Oct 29, 2008 at 12:10 AM, Yeti <yeti@xxxxxxxxxx> wrote:

> > If your trying to filter E-Mail addresses, then filter_var is what you
> > should use:
> >
> > http://php.net/filter_var
>
> If the OP (original poster) got PHP5+
>
> --
> 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