Link to home
Start Free TrialLog in
Avatar of bryanche
bryanche

asked on

How to customize Regular Expression for a strong password in asp classic?

Hi experts,
I'm trying to customize regular exp. to only allow certain special characters like #$@^+. the one I'm using is working but not quiet the way I want. I would reject any special charancter that I do not allow but the problem is if I enter a valid special character and then I enter a non valid special character it will accept it because it finds a valid one in the string. Here's the one I use:
Dim RegExpPass
Set RegExpPass = new RegExp
With RegExpPass
.Pattern = "^.*(?=.{8,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$^+]).*$"
.IgnoreCase = True
.Global = True
End With
ASKER CERTIFIED SOLUTION
Avatar of ddrudik
ddrudik
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bryanche
bryanche

ASKER


Hi ddrudik,
your solution was fantastic. Really appreciate it.
Thanks for the question and the points.