Paradox Community

Items in pnews.paradox-programming

Subject:Re: advmatch for email
Date:14 May 2018 05:38:40 -0400
From:"Thies Grimm" <thies.grimm@t-online.de>
Newsgroups:pnews.paradox-programming

Hi,

we ended up wit a function cmIsValidEmailAddress, doing these steps:

1. Check split mailaddress ==> Account@Domain.TLD

2. Account
2.1   Check invalid characters
2.2   Check for 2 dots following each other

3. Domain
3.1   Check invalid characters
3.2   Check for 2 dots following each other

4. TLD TopLevelDomain
4.1   Check for valid TopLevelDomain, using our table tblZTLD.db

complicated, but works.

Thies


Michael Kennedy <Info@KennedySoftware.ie> wrote:
>Thank you, Mark.
>
>I did not appreciate that the "$" is a "MUST MATCH" at the end of the 
>supplied string, and therefore those spurious "@"-chars that I included

>will be rejected.
>
>Good news!
>
>   - Mike
>
>
>On 13/05/2018 20:52, Mark Bannister wrote:
>> "^([^\\@]+)\\@([^\\@.]+).([^\\@]+)$"
>> 
>> ^  -- must start at beginning of line/string
>> 
>> ([^\\@]+)  -- do not match "@" character "+" = one or more of preceding

>> character so translates to match any character(s) except "@"
>> 
>> \\@  -- match the "@" character
>> 
>> ([^\\@.]+)  -- do not match "@" or "."  (any character but "@" and "."
)
>> 
>> 
>> .   -- match the "."
>> 
>> ([^\\@]+)   -- do not match "@" (any character but "@" )
>> 
>> 
>> $  -- match must be at end of the string
>> 
>> It will not match for the addresses you asked about.
>> 
>> 
>> On 5/12/2018 5:13 PM, Michael Kennedy wrote:
>>> Steve,
>>>
>>> Mainly for lurkers... and a query at the end...
>>>
>>>  > "^([^\\@]+)\\@([^\\@.]+).([^\\@]+)$"
>>>
>>> The pattern codes for ADVMATCH() in PDoxWin are similar, but also 
>>> significantly different from, those for RegEx (Regular Expressions)
>>>
>>> To parse the above:
>>>
>>>   ^ = Start of Pattern
>>>
>>>   ([^\\@]+) = One or more chars, up to an "@" (or end?)
>>>
>>>   \\@ = One "@"
>>>
>>>   ([^\\@.]+ = One or more chars, up to the first "@" or "." (or end?)
>>>
>>>   . = One "."
>>>
>>>   ([^\\@]+) = One or more chars, up to an "@" (or end)
>>>
>>>   $ = End of Pattern
>>>
>>> ------------------------------------------------------------------
>>>
>>> Overall, this seems like a quite good email-address validator.
>>>
>>> Out of curiosity, if you get a chance, could you check if it 
>>> accepts/rejects an email with an "@" near the end:
>>>
>>>   Steve@OasisTradingPost.com.au.nz@
>>>   Steve@OasisTradingPost.com.@
>>>   Steve@OasisTradingPost.com.a@u.nz
>>>
>>>    - Mike
>>>
>>>
>>> On 11/05/2018 13:28, Steven Green wrote:
>>>> "^([^\\@]*)\\@([^\\@.]*).([^\\@]*)$"
>>>>
>>>> anybody got a better one?
>>>>
>>>> -- 
>>>>
>>>> Steven Green
>>>> Myrtle Beach, South Carolina, USA
>>>>
>>>> http://www.OasisTradingPost.com
>>>>
>>>> Collectibles and Memorabilia
>>>> Vintage Lego Sets and Parts
>>>> - and Paradox support, too
>> 


Copyright © 2004 thedbcommunity.com