ExtensionMethod.NET Home of 818 C#, Visual Basic, F# and Javascript extension methods

IsEmail

Check string for valid Email address

Source

<Extension()> _
Public Function IsEmail(ByVal value As String) As Boolean
    Dim reg As Regex = New Regex("^\d{3}-\d{2}-\d{4}$")
    Return reg.IsMatch(value)
End Function

Example

Texbox1.Text.IsEmail

Author: NetDorkie

Submitted on: 16 jul 2009

Language: VB

Type: System.String

Views: 3207