[thelist] regex help - password pattern - javascript

Tom Dell'Aringa pixelmech at yahoo.com
Mon Sep 26 16:43:40 CDT 2005


--- Frank <lists at frankmarion.com> wrote:
> OOPS! I gapped out for a second
> 
> ^([\w\d]{2,8})$
> 
> ^ start string
>          Remember
>          (
>          [any \word or \digit] {two to eight times repeated}
>          )
> $ end string

Hmm, not seeming to work - remember the *minimum* length is 8 characters. Furthermore they *must*
have at least 2 digits, and 2 alpha characters. \w is letter, digit or underscore correct? I'm
using the RegEx coach trying to figure this out but not having much luck. My mind says I need
something like this:

^([a-z\d]{2,}[a-z\d]{2,})\w{6,}$

They need to put 2 alpha (uc/lc doesn't matter) and 2 digits - then 6 other of anything else -
word char that is. This part tests out right:

[a-z\d]{2,}[a-z\d]{2,}

It will validate ee33 or e3e3 or 33ee which is great, but I can't seem to put the rest on
successfully...

Tom


http://www.pixelmech.com/

A man spoke frantically into the phone: "My wife is pregnant and her contractions are only two minutes apart"! "Is this her first child?" the doctor asked. "No, you idiot!" the man shouted. "This is her husband!"

Q: What do you call a muddy chicken who crossed the road two times?
A: A dirty double crosser...



More information about the thelist mailing list