Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Email Validation
Message
From
04/11/2011 16:22:03
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
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:
01528124
Views:
62
Not trying to gang up, but your email worked fine for me as well. I did notice that a space on either end of the email caused it to fail. alltrim() maybe?

>>>>>>
"^([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
>>>>>
>>>>>I tried the pattern suggested by Sergey in this thread and it works fine and much simpler. However, I haven't tested it too thorough yet - may be that pattern is too generous.
>>>>
>>>>According to what Craig said, the pattern I presented is the "official" version.
>>>
>>>This pattern does not work with the valid e-mails I have.
>>>
>>>FLastName@CompanyName-mtn.com (the company name includes -mtn)
>>
>>Pattern works fine for me with FLastName@CompanyName-mtn.com
>>
>>
>>FUNCTION ValidEmail
>>LPARAMETERS lcMail
>>LOCAL ox, llReturn
>>IF PCOUNT()>0 AND VARTYPE(lcMail)='C'
>>	ox=CREATEOBJECT('VBScript.RegExp')
>>	*ox.PATTERN =  '(\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,9})'
>>	ox.PATTERN = "^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$"
>>	ox.IgnoreCase= .T.
>>	ox.GLOBAL=.F.
>>	llReturn=ox.Test(lcMail)
>>	RELEASE ox
>>	ox=.NULL.
>>ENDIF
>>RETURN llReturn
>>
>>
>>
>
>I re-tried a few times - it does not work. I am getting invalid e-mail using this pattern.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform