Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Response.Write(IsEmail("chittimca3@gmail.com"))
End Sub
Public Function IsEmail(ByVal Email As String) As Boolean
Dim strRegex As String = "^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}" & "\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\" & ".)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"
Dim re As New Regex(strRegex)
If re.IsMatch(Email) Then
Return (True)
Else
Return (False)
End If
End Function
0 comments:
Post a Comment