Displaying page
of
pages;
Items to
Title |
Test
Details
Strong Password
|
Expression |
^(?=(.*[a-z]){1,})(?=(.*[\d]){1,})(?=(.*[\W]){1,})(?!.*\s).{7,30}$
|
Description |
The basic expression requires at least 1 lower case, 1 upper case, 1 numeric, 1 non-word and no whitespace.
<br /><br />
The format of the expression lends itself to being parameterised, thus in C# I have a method that returns a modified pattern based on passed in parameters e.g.
<br /><br />return "^(?=(.*[a-z]){" + minLowerCase.ToString() + ",})"<br /> + "(?=(.*[\d]){" + minNumeric.ToString() + ",})"<br /> ... <br /> + ".{" + minLength.ToString() + "," + maxLength.ToString() + "}$");<br /><br />Its then possible to set the password strength via configuration files which require strong passwords in production environments, but allow weaker passwords in development environments.
|
Matches |
qW1@xxx
|
Non-Matches |
qwerty123
|
Author |
Rating:
Not yet rated.
Chris Stead
|
Displaying page
of
pages;
Items to