We Recommend

ASP.NET 3.5 Unleashed ASP.NET 3.5 Unleashed
ASP.NET 3.5 Unleashed is the most comprehensive book available on the Microsoft ASP.NET 3.5 Framework, covering all aspects of the ASP.NET 3.5 Framework--no matter how advanced.


Posted By

krisdb on 03/09/07


Tagged

ASP


Versions (?)


valid email


Published in: ASP 


  1. Function RegExpTest(sEmail)
  2. RegExpTest = false
  3. Dim regEx, retVal
  4. Set regEx = New RegExp
  5.  
  6. regEx.Pattern ="^[\w-\.]{1,}\@([\da-zA-Z-]{1,}\.){1,}[\da-zA-Z-]{2,3}$"
  7.  
  8. regEx.IgnoreCase = true
  9.  
  10. retVal = regEx.Test(sEmail)
  11.  
  12. If not retVal Then _
  13. exit function
  14.  
  15. RegExpTest = true
  16. End Function

Report this snippet 

You need to login to post a comment.