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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Password Strength
Expression
^((?=.{8,32}$)(?=.*\p{Lu})(?=.*\p{Ll})((?=.*\p{N})|(?=.*\p{P}))(?!.*\s))
Description
This .NET Framework expression tests a submitted password for length, a capital and lower case letter, a number or punctuation character and no spaces.<br /> (?=.{8,32}$) tests for a minimum of 8 characters and maximum of 32. (?=.*\p{Lu}) tests for at least one upper case letter anywhere in the string. (?=.*\p{Ll}) tests for at least one lower case letter anywhere in the string. ((?=.*\p{N})|(?=.*\p{P})) tests that there is at least one number OR one punctuation mark. (?!.*\s) tests that there are no spaces in the string.
Matches
Pass-Word | paSS1woRD | p4SSword
Non-Matches
PassWord | pass1RD | p4ssword
Author Rating: The rating for this expression. Jay A. Moritz
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

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