Simple ASP.NET (VB) Email Validator

I needed one, and after scouring the net, I found this little bad boy:

Dim Expression As New System.Text.RegularExpressions.Regex("\S+@\S+\.\S+")
If Expression.IsMatch(strEmail) Then
	' Email is valid
Else
	' Email is not valid
End If

Volia!

.: Adam


Leave a Reply