bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Incorrect example for `[[` command.


From: Chet Ramey
Subject: Re: Incorrect example for `[[` command.
Date: Sun, 22 Sep 2019 13:53:37 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 9/21/19 5:34 AM, Ilkka Virta wrote:
> On 21.9. 03:12, hk wrote:
>> Thanks for the reply. I was wrong in my report. It does match values like
>> aab and  aaaaaab  in its original form.
> 
> In some systems, yes. (It does that on my Debian, but doesn't work at all
> on my Mac.)
> 
>> It is syntatically correct as a regular expression. 
> 
> [[:space:]]*?(a)b  isn't a well-defined POSIX ERE:
> 
>   9.4.6 EREs Matching Multiple Characters
> 
>   The behavior of multiple adjacent duplication symbols ( '+', '*', '?',
>   and intervals) produces undefined results.

It's ambiguous, but it can be interpreted as valid. I wonder why they used
"undefined" instead of the usual "unspecified."


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]