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
Solved

Help with reg Exp for web.config

Posted on 2014-02-05
4
314 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 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

809 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