Solved

Help with reg Exp for web.config

Posted on 2014-02-05
4
315 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 75

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 75

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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

749 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