Imports System.Text.RegularExpressions Public Class Tester Public Shared Sub Main Dim sPostalCode As String = "A1A 1A1" Dim sPattern As String Dim objRegEx As Regex sPattern = "[ABCEGHJKLMNPRSTVXY]\d[A-Z]\d[A-Z]\d" Console.WriteLine(objRegEx.IsMatch(sPostalCode, sPattern)) End Sub End Class
False