Imports System.Text.RegularExpressions
Imports System
Public Class MainClass
Shared Sub Main()
If Not Regex.Match("111-111-1111", "^[1-9]" & _
"\d{2}-[1-9]\d{2}-\d{4}$").Success Then
' phone was incorrect
Console.WriteLine("Invalid Phone Number")
Return
End If
End Sub ' Main
End Class