You are here: Re: Regular Expression to validate password « PHP Programming Language « IT news, forums, messages
Re: Regular Expression to validate password

Posted by adzir on 05/07/07 16:08

On May 7, 11:53 pm, Michael Fesser <neti...@gmx.de> wrote

> Way too complicated and using the old deprecated ereg* functions.
>
> If the PW should only contain letters and digits, then use a pattern
> that matches for exactly that:
>
> preg_match('#[A-Z\d]+#i', $str);
>
> If there has to be a capital letter somewhere in the PW, then try a
> combination like this:
>
> preg_match('#[a-zA-Z\d]*[A-Z][a-zA-Z\d]*#', $str);
>
> HTH
> Micha

Hey thanks,

I was referring an old book. I didn't noticed that there is another
function best suits to my needs. My broadband was out for a week and I
was stuck dead.

but u didn't answer my another question which was to get rid of the
symbols? anyway thanks a lot

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация