Click here to Skip to main content
11,928,985 members (56,803 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


7 bookmarked

ASP.NET Password Strength Regular Expression

, 5 Jan 2011 CPOL
Rate this:
Please Sign up or sign in to vote.
ASP.NET Password Strength Regular Expression. Customize n numbers of upper case, digits, special characters.

Shown below is the regular expression for password strength with n number of digits, upper case, special characters and at least 12 characters in length.



(?=^.{12,25}$) -- password length range from 12 to 25, the numbers are adjustable 
(?=(?:.*?[!@#$%*()_+^&}{:;?.]){1}) -- at least 1 special characters (!@#$%*()_+^&}{:;?.}) , the number is adjustable 
(?=(?:.*?\d){2}) -- at least 2 digits, the number is adjustable 
(?=.*[a-z]) -- characters a-z 
  (?=(?:.*?[A-Z]){2}) -- at least 2 upper case characters, the number is adjustable 


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Bryian Tan
Software Developer
United States United States
I have over three years of experience working with Microsoft technologies. I have earned my Microsoft Certified Technology Specialist (MCTS) certification. I'm a highly motivated self-starter with an aptitude for learning new skills quickly.

You may also be interested in...

Comments and Discussions

GeneralReason for my vote of 5 Good work! Pin
Abdul Quader Mamun5-Jan-11 18:53
memberAbdul Quader Mamun5-Jan-11 18:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.151126.1 | Last Updated 5 Jan 2011
Article Copyright 2011 by Bryian Tan
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid