.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Melody Anderson

Home >> Code Snippets >> Regular Expressions >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Check Password in Vb.net

Posted By:Narayanan       Posted Date: April 15, 2013    Points: 40    Category: Regular Expressions    URL: http://www.dotnetspark.com  

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


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend