Click here to Skip to main content
13,094,732 members (93,964 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


7 bookmarked
Posted 1 Jan 2011

ASP.NET Password Strength Regular Expression

, 5 Jan 2011
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 (Senior)
United States United States
I have over 10 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 nice one Pin
vikas amin5-Jan-11 9:24
membervikas amin5-Jan-11 9:24 

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.

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