Try:
^(?=.*[A-Za-z])(?=.*[\d])(?!.*[A-Za-z0-9])(?!.*s).{8,}$
That should require at least 8 characters with one digit.
It might be easier just to do separate tests, though. Up to
you, really.
Pseudocode:
If Len(password) >= 8
RegExp = "[\D]"
stripped password = RegExp.Replace(password,"")
If Len(stripped password) > 0
OK!
Else
You forgot to include a number!
End
Else
That's not long enough
End
"jim balthrop" <webforumsuser@macromedia.com> wrote in
message
news:f0lpte$blc$1@forums.macromedia.com...
>i have a form password to be server validated
> the password needs to be at least 8 characters with at
least 1 being
> numeric.
>
> this expression example that i found is supposed to be
6-8 characters with
> at
> least 1 letter
>
> /^(?![0-9]{6,8})[0-9a-zA-Z]{6,8}$/
>
> can anyone help change this expression to match my
requirements?
>
> i can see the {6,8} being {8,9} but not sure of the
other changes?
>
> thanks for your help
> jim balthrop
>
>