Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Email Validation
Message
 
 
To
15/03/2010 03:15:59
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01454317
Message ID:
01528115
Views:
99
>This is the function I use
>Function ValidEmail
>   Lparameters lcMail
>   Local ox, llReturn
>   If Pcount()>0 And Vartype(lcMail)='C'
>      ox=Createobject('VBScript.RegExp')
>      ox.Pattern= '^[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]' + ;
>         '@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]' + ;
>         '\.[a-zA-Z]{2,4}$'
>      ox.IgnoreCase= .T.
>      ox.Global=.F.
>      llReturn=ox.Test(lcMail)
>      Release ox
>      ox=.Null.
>   Endif
>Return llReturn
>
I tried this and another pattern, and they both reject this e-mail
FLastname@name-mtn.com
But I know it's a valid e-mail. What pattern is correct for e-mail validations?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform