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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Strong Password
Expression
(?-i)(?=^.{8,}$)((?!.*\s)(?=.*[A-Z])(?=.*[a-z]))(?=(1)(?=.*\d)|.*[^A-Za-z0-9])^.*$
Description
Strong password with the following requirements. - At least 8 characters long. - At least 1 uppercase, AND at least 1 lowercase - At least 1 digit OR at least 1 alphanumeric. - No spaces.
Matches
a3dAbed. | P@ssword1 | aB_1bbbb | myPassw0rd!
Non-Matches
password | password12 | password__12 | p@ssw0rd
Author Rating: The rating for this expression. Eric Malamisura
Source Eric Malamisura
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: Error in your RE
Name: Alex G
Date: 5/5/2008 2:36:53 PM
Comment:
Your RE should match pasSword77 but it doesn't, here is the correct RE: (?-i)(?=^.{7,}$)((?!.*\s)(?=.*[A-Z])(?=.*[a-z]))((?=(.*\d){1,})|(?=(.*\W){1,}))^.*$


Title: Error in your RE
Name: Alex G
Date: 5/5/2008 2:36:41 PM
Comment:
Your RE should match pasSword77 but it doesn't, here is the correct RE: (?-i)(?=^.{7,}$)((?!.*\s)(?=.*[A-Z])(?=.*[a-z]))((?=(.*\d){1,})|(?=(.*\W){1,}))^.*$


Title: Strong Password
Name: Alex G
Date: 5/5/2008 12:17:57 PM
Comment:
(?-i)(?=^.{7,}$)((?!.*\s)(?=.*[A-Z])(?=.*[a-z]))((?=(.*\d){1,})|(?=(.*\W){1,}))^.*$


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