[thelist] regex help - password pattern - javascript

Joshua Olson joshua at waetech.com
Tue Sep 27 10:01:06 CDT 2005


> -----Original Message-----
> From: thelist-bounces at lists.evolt.org 
> [mailto:thelist-bounces at lists.evolt.org] On Behalf Of Frank
> Sent: Tuesday, September 27, 2005 10:47 AM
> 
> If any other chars are allowed, then this will return a 
> minimum of two alphas and two nums and eight 
> characters
> 
> (?=.*[a-z_].*[a-z_])(?=.*[0-9].*[0-9]).{8,}

Frank,

Use of forward lookahead asserts is fairly novel.  They are not necessarily
supported by all implementations of regex, but seem to get the job done.
Good work.  Your solution could easily be expanded to match more restrictive
character sets as well.

<><><><><><><><><><>
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