Regular Expresson for checking password strength
| From: | James Nunnerley | Date: | Fri, 04 Aug 2006 11:54:07 +0000 |
| Subject: | Regular Expresson for checking password strength | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-240106@lists.php.net to get a copy of this message | ||
I want to have a regular expression that check the following criteria are
met by $password:
- contains at least 6 characters (any)
- has at least 1 letter
- has at least 1 number
- other 6 characters can be anything...
I'm happy to work out the structure of a postcode etc, but to be honest I'm
still fairly new to working with regular expressions.
What the best/easiest way to check whether a variable contains a range? It
might be RegExp don't do this?
Cheers
Nunners