Private Sub btnSubmit_Click(sender As Object, e As EventArgs) Handles btnSubmit.Click Dim regPost As New System.Text.RegularExpressions.Regex("^[A-Za-z]{1,2}[0-9A-Za-z]{1,2}[ ]?[0-9]{0,1}[A-Za-z]{2}$") Dim strTest As String = "SW11 2LE" Dim strWrong As String = "11710" Debug.Print(strTest & " - " & regPost.IsMatch(strTest)) Debug.Print(strWrong & " - " & regPost.IsMatch(strWrong))
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)