Hello,
I want to verify that a password is:
- Minimum 7 characters (can be any character)
- Includes at least 1 number.
I thought this would work but it does seem to:
^(?=.*[a-z])(?=.*[A-Z]).{7,}$
Thanks,
Joe
Jesse Houwing - 11 Feb 2008 19:10 GMT
Hello Joe,
> Hello,
>
[quoted text clipped - 5 lines]
> Thanks,
> Joe
There is no check for a number in there at all....
^(?=.*[0-9]).{7,}$
should do the trick.
--
Jesse Houwing
jesse.houwing at sogeti.n
lue - 11 Feb 2008 19:37 GMT
Joe
see this link
http://davidhayden.com/blog/dave/archive/2004/09/25/501.aspx
password complexity in your applications:
^.*(?=.{7,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%^&+=]).*$
The regular expression enforces the following rules:
a.. Must be at least 7 characters
b.. Must contain at least one one lower case letter, one upper case
letter, one digit and one special character
c.. Valid special characters (which are configurable) are - @#$%^&+=
Regards
Lue
> Hello,
>
[quoted text clipped - 7 lines]
> Thanks,
> Joe