A Regular Expression to validate alphabetic characters with dots and spaces in VB.net

Posted by Rajnilari2015 under VB.NET category on | Points: 40 | Views : 1017
Suppose we have a string like A.K. Ramaswamy

And we want to write the regular expression for the same. The below will do so

Imports System.Text.RegularExpressions

Namespace ConsoleApplication1
Class Program
Private Shared Sub Main(args As String())
Dim input = "A.K. Ramaswamy"
Dim rgx As New Regex("^[a-zA-Z. ]*$")
End Sub
End Class
End Namespace

Comments or Responses

Login to post response