Regular Expression to Enforce Password Complexity in ASP.NET Applications

Regular expression to enforce password complexity in your applications:

^.*(?=.{10,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%^&+=]).*$

The regular expression enforces the following rules:

•Must be at least 10 characters
•Must contain at least one one lower case letter, one upper case letter, one digit and one special character
•Valid special characters (which are configurable) are – @#$%^&+=

Originally from Anil John’s post
http://cyberforge.com/weblog/aniltj/archive/2004/09/23/670.aspx

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s