Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Email Validation
Message
De
04/11/2011 15:29:25
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01454317
Message ID:
01528116
Vues:
81
J'aime (1)
>>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?
"^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$"
according to Craig Boyd's blog http://www.sweetpotatosoftware.com/spsblog/2006/01/04/ARegularExpressionsLibraryForVisualFoxPro.aspx, it's
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform