countrymeister
asked on
Reqular expression in vb.net to check content of password field
I have a password field I need a regular expression to check if my filed has atleast one upper case letter ,atleast one number andat least one special character, tried this which does not work
Dim bUppercase As Boolean = Regex.IsMatch(txtPassword. Text, "^/[A-Z]/*$")
Dim bNumeric As Boolean = Regex.IsMatch(txtPassword. Text, "^/[0-9]/*$")
Dim bSpecial As Boolean = Regex.IsMatch(ItxtPassword .Text, "^/[.!@#$%^&*]/*$")
Dim bUppercase As Boolean = Regex.IsMatch(txtPassword.
Dim bNumeric As Boolean = Regex.IsMatch(txtPassword.
Dim bSpecial As Boolean = Regex.IsMatch(ItxtPassword
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In my first post, I think you need to escape the backslash:
Dim bNumeric As Boolean = Regex.IsMatch(txtPassword. Text, "\\d")
Dim bNumeric As Boolean = Regex.IsMatch(txtPassword.
you can use this control:
http://www.asp.net/ajax/ajaxcontroltoolkit/samples/passwordstrength/passwordstrength.aspx
http://www.asp.net/ajax/ajaxcontroltoolkit/samples/passwordstrength/passwordstrength.aspx
@TerryAtOpus
In my first post, I think you need to escape the backslash:Not in VB ; )
Open in new window