Solved

Regular Expression

Posted on 2010-11-17
3
365 Views
Last Modified: 2012-05-10
Can anyone help me to create a regular expression for below validation,

Cannot start a password with a digit
Minimum password length      8
Maximum password length 10
Cannot have consecutive repeating characters (Ex:- aabd312)
Require minmum 1 digit in password      
Allowed special characters      $ @ # _

Thanks
Shaminda
0
Comment
Question by:PMS-ICT
3 Comments
 
LVL 10

Expert Comment

by:Jini Jose
ID: 34153655
you can design your own expression with this free tool

http://www.radsoftware.com.au/regexdesigner/

0
 

Author Comment

by:PMS-ICT
ID: 34153796
Thanks for the link to regexdesigner, Unfortunately I’m not very sure how to use it:(
0
 
LVL 35

Accepted Solution

by:
Terry Woods earned 500 total points
ID: 34159209
Use this:

Dim re As Regex = New Regex("^(?!\d)(?!.*(.)\1)(?=.*\d)[\w\d$@#]{8,10}$")
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

830 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