VB.Net : Check If Given String is EmailID

Public Function IsEmail(ByVal email As String) As Boolean
Dim emailRegex As New Regex(“^([\w-\.]+)@([\w-]+\.)+([\w-]{2,4})$”)

If emailRegex.IsMatch(email) Then
Return True
Else
Return False
End If
End Function

Scroll to Top