Password reg ex.

Posted on 2009-02-09
Last Modified: 2012-06-27
Hi All,

I see pleanty of password reg ex, but nothing quite what I need.

Min chars = 6
Max Chars = 12
Must have at least One Number
Must Have at leat One capital letter
Only Letters and numbers allowed but can have Spanish characters. Is it posible to have a locale setting. For example the following chars (Ññ,ÁáÉé) etc.

Any ideas?

Question by:Abiel de Groot
    LVL 33

    Accepted Solution

    I'm assuming you are using the logic on a password screen.  Without working into a fancy Regular Expression, that I don't even know how to create for you.  Have you tried keeping it simple and using a few combined regular expressions to create the final validation?

    For instance, you have a RegExValidator that validates the size, another validates that it has one number, another validates it has one capital letter, etc.  The final result will be 4-5 regexvalidators, but it'll be much simpler to debug, and you can give the user a specific error message of what their password doesn't have.
    LVL 5

    Author Comment

    by:Abiel de Groot
    You logic makes good sense. Will try as you suggest.

    Many thanks


    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
    This demonstration started out as a follow up to some recently posted questions on the subject of logging in: and…
    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…
    This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

    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

    14 Experts available now in Live!

    Get 1:1 Help Now