[thelist] regex help - password pattern - javascript
Joshua Olson
joshua at waetech.com
Tue Sep 27 09:13:41 CDT 2005
> -----Original Message-----
> From: Tom Dell'Aringa [mailto:pixelmech at yahoo.com]
> Sent: Monday, September 26, 2005 10:45 PM
>
> I must not have been clear, requirements are:
>
> - MINIMUM of 8 characters in length (can be longer)
> - 2 digits REQUIRED (anywhere in string)
> - 2 alpha REQUIRED (anywhere in string)
>
I get the overwhelming feeling that this problem is going to take 3 steps.
Step 1. Check for length.
Step 2. Check for 2 digits
Step 3. Check for 2 alphas
Step 1: can be accomplished using a simple string.length.
Step 2: ([0-9a-z]*[0-9]){2}[0-9a-z]*
Step 3: ([0-9a-z]*[a-z]){2}[0-9a-z]*
If characters other than alphas and digits are allowed, replace instances of
[0-9a-z] with the appropriate set of characters.
HTH,
<><><><><><><><><><>
Joshua L. Olson
WAE Tech Inc.
http://www.waetech.com/
Phone: 706.210.0168
Fax: 413.812.4864
Monitor bandwidth usage on IIS6 in real-time:
http://www.waetech.com/services/iisbm/
More information about the thelist
mailing list