Paradox Community

Items in pnews.paradox-programming

Subject:Re: advmatch for email
Date:Sun, 13 May 2018 22:56:52 +0100
From:Michael Kennedy <Info@KennedySoftware.ie>
Newsgroups:pnews.paradox-programming
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