h1.post-title { color:orange; font-family:verdana,Arial; font-weight:bold; padding-bottom:5px; text-shadow:#64665b 0px 1px 1px; font-size:32px; } -->

Pages

Check Password in Vb.net

Today,we will discuss about the Password Checking using regular Expression in VB.net
Here is a Sample code for Password Checking using Regular Expression in VB.Net


Dim reg As Regex
 reg = New Regex("^(?=.*d)(?=.*[a-z])(?=.*[A-Z]).{6,10}$")
     Dim mat As Match = reg.Match(TextBox1.Text)
     If mat.Success = False Then
         MessageBox.Show("Please enter at least one upper case letter, one lower case letter, and one numeric digit.")
         TextBox1.Text = ""
     End If