Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 369
  • Last Modified:

Regular Expression

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
PMS-ICT
Asked:
PMS-ICT
1 Solution
 
Jini Jose.Net Team LeadCommented:
you can design your own expression with this free tool

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

0
 
PMS-ICTAuthor Commented:
Thanks for the link to regexdesigner, Unfortunately I’m not very sure how to use it:(
0
 
Terry WoodsIT GuruCommented:
Use this:

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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now