View Single Post
  #1 (permalink)  
Old Aug 12th, 2003, 09:56
Smokie Smokie is offline
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
Email Address Validation

Heres a little function you can use to check your users enter valid email addresses:

<font color="blue">Function IsValidEmail(emailaddress)
Dim mc
Set mc = New RegExp
mc.Pattern = "^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$"

results = mc.Test(trim(emailaddress))
If results Then
IsValidEmail = True
Else
IsValidEmail = False
End If
End Function</font id="blue">



Cheers
Smokie