RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Password complexity
Expression
(?=[-_a-zA-Z0-9]*?[A-Z])(?=[-_a-zA-Z0-9]*?[a-z])(?=[-_a-zA-Z0-9]*?[0-9])[-_a-zA-Z0-9]{6,}
Description
Tests if the input consists of 6 or more letters, digits, underscores and hyphens. The input must contain at least one upper case ltter, one lower case letter and one digit.
Matches
M0_k3y Pa-sW0rd S1mPl3
Non-Matches
MonKey PassWord simple
Author Rating: The rating for this expression. Roberto Santana
Source
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: The 'at least one upper case letter' rule fails
Name: Ryan Shripat
Date: 11/19/2010 8:52:35 AM
Comment:
passw0rd ...matches, and it shouldn't.


Title: Fails in case of javascript
Name: Abhi
Date: 10/15/2008 10:59:37 AM
Comment:
The expression fails in case of Javascript. Works fine with .NET engine? Do we need to change it while using it in Clientside script?


Title: Fails in case of javascript
Name: Abhi
Date: 10/15/2008 10:46:08 AM
Comment:
The expression fails in case of Javascript. Works fine with .NET engine? Do we need to change it while using it in Clientside script?


Title: Fails in case of javascript
Name: Abhi
Date: 10/15/2008 10:45:54 AM
Comment:
The expression fails in case of Javascript. Works fine with .NET engine? Do we need to change it while using it in Clientside script?


Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials