Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15400

Re: Incorrect example for `[[` command.

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: Incorrect example for `[[` command.
Date 2019-09-22 13:53 -0400
Organization ITS, Case Western Reserve University
Message-ID <mailman.798.1569174827.2190.bug-bash@gnu.org> (permalink)
References <CAD0rTC7W20s7-8np7Z+CmZQczTQ+LX=Y1x01gAenewrpiJS5jw@mail.gmail.com> <8e7c8ea4-2fdf-4809-0b50-ea1bfbbec165@case.edu> <CAD0rTC68qoXvCV9SLP1dJ8Gvg71W7bg9yt8jjpmpESK-jKD7Wg@mail.gmail.com> <bf5a1810-8316-239c-0c5a-f85803048ab6@iki.fi> <c8425e21-172a-7aae-ae20-53ff339addbd@case.edu>

Show all headers | View raw


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/

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: Incorrect example for `[[` command. Chet Ramey <chet.ramey@case.edu> - 2019-09-22 13:53 -0400

csiph-web