[thelist] regex help - password pattern - javascript
thelist at cjmarsh.com
thelist at cjmarsh.com
Tue Sep 27 03:34:42 CDT 2005
Volkan
> Why not split our problem and use two reg exps?
>
> One tests
>
> ^([\w\d]{2,8})$
>
> if it passes, apply another test:
>
> ^.*?[\d].*?[\d].*?$
>
> I've not tested the second one though. There can be a neater
> simpler expression for it.
Personally I would agree that this is a job for two regular expressions.
Would they not be as follows, though?
^[\w\d]{8,}$
^\w*\d\w*\d\w*$
Have a look at <http://www.cjmarsh.com/checkPassword.htm> for an example.
HTH
Regards
Chris Marsh
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.7/112 - Release Date: 26/09/2005
More information about the thelist
mailing list