Imports System.Text.RegularExpressions<vbnet> The namespace above provides regular expression functionality that may be used from any platform or language that runs within the Microsoft .NET Framework and it determines whether a particular string conforms to a regular expression pattern. 4. Put this code for the Button1_Click. This will trigger to decide whether the inputted phone number is valid or not. <vbnet> Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim phonenumber As New Regex("\d{4}-\d{3}-\d{4}") If phonenumber.IsMatch(TextBox1.Text) Then Else End If End Sub
Engr. Lyndon R. Bermoy
IT Instructor/System Developer/Android Developer
Mobile: 09079373999
Telephone: 826-9296
E-mail:[email protected]
Visit and like my page on Facebook at: Bermz ISware Solutions
Subscribe at my YouTube Channel at: SerBermz