I had used this code to validate email id in textbox,but it is not working properly pls help me. thanks in advance
Code:
Dim Expression As New System.Text.RegularExpressions.Regex("^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$")
If Expression.IsMatch(Textbox1.Text) Then
MsgBox("The email address is valid.")
Else
MsgBox("The email address is NOT valid.", MsgBoxStyle.Critical, "Invalid Mail ID")
Exit Sub
End If
Comment