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
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)(?=.*
.IgnoreCase = True
.Global = True
End With
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks for the question and the points.
ASKER
Hi ddrudik,
your solution was fantastic. Really appreciate it.