Advertisement

03.26.2007 at 09:36AM PDT, ID: 22472805
[x]
Attachment Details

Regular Expression - determining string length in combination with other properties

Asked by jccviking in Regular Expressions

I'm new to regular expressions and am trying to create an expression to validate password complexity.  Below I've listed the password requirements:

1.  No white space.
2.  At least one lowercase letter
3.  At least one uppercase letter
4.  At least one digit
5   At least one non-alphanumeric character
6.  At least eight characters long

The regular expression below checks requirements 1 through 5 but I can't seem to figure out how to add number 6 - the length.  

\s{0}\p{Ll}{1,}\p{Lu}{1,}\d{1,}\W{1,}

I'm sure this is trivial for you mavens.

Thanks,

John C. ChristensenStart Free Trial
[+][-]03.26.2007 at 09:50AM PDT, ID: 18794158

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Regular Expressions
Sign Up Now!
Solution Provided By: ozo
Participating Experts: 1
Solution Grade: A
 
 
[+][-]03.26.2007 at 10:36AM PDT, ID: 18794504

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32