Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Verify emails
Message
From
01/05/2006 17:12:17
 
 
To
01/05/2006 16:56:08
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
01118195
Message ID:
01118200
Views:
18
That's it.
That would help me do some cleaning.

thanks Tore

>
>Do you mean to validate the email addresses? This function is pretty accurate, meaning that it will return .T. only for legal email addresses.
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform