Solved

Help with reg Exp for web.config

Posted on 2014-02-05
4
311 Views
Last Modified: 2014-02-06
Hi there

Hope you can help me out

In the web.config I have to add a Property called

PasswordStrengthRegularExpression

the RegExp must be

English uppercase characters (A - Z)
English lowercase characters (a - z)
Base 10 digits (0 - 9)

... and you MUST have 1 of each item i.e.

1 UpperCase char
1 LowerCare char
1 number between 0 - 9

Can someone please help me with the regexp

thanks
0
Comment
Question by:mousemat24
  • 2
  • 2
4 Comments
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 39836362
This should do it:

^(?=[^A-Z]+[A-Z])(?=[^a-z]+[a-z])(?=[^0-9]+[0-9])[A-Za-z0-9]+$

Open in new window

0
 

Author Comment

by:mousemat24
ID: 39838524
Hi

I went to this site, added your regex to it

reg

and entered the following text, that "should" of worked, but did not

BrickWall08
0
 
LVL 74

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 39838795
What a difference a single character can make!!  I used the wrong quantifier:

^(?=[^A-Z]*[A-Z])(?=[^a-z]*[a-z])(?=[^0-9]*[0-9])[A-Za-z0-9]+$

Open in new window

0
 

Author Comment

by:mousemat24
ID: 39838972
that worked, thank you so much for your help!
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Set cookies HttpOnly and Secure 4 62
File Upload Control on a ASP.NET Overlay Page 1 26
Create XML 5 34
XAML: Layout 8 0
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now