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


Groups > gnu.bash.bug > #15395

Re: Incorrect example for `[[` command.

From Dmitry Goncharov <dgoncharov@users.sf.net>
Newsgroups gnu.bash.bug
Subject Re: Incorrect example for `[[` command.
Date 2019-09-21 14:55 -0400
Message-ID <mailman.741.1569092119.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> <20190921185509.GA5480@madrid>

Show all headers | View raw


On Sat, Sep 21, 2019 at 12:34:39PM +0300, Ilkka Virta wrote:
> [[: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.
> 
> https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/basedefs/V1_chap09.html

This is unfortunate.
*? and +? are widely used not greedy regexes.

regards, Dmitry

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


Thread

Re: Incorrect example for `[[` command. Dmitry Goncharov <dgoncharov@users.sf.net> - 2019-09-21 14:55 -0400

csiph-web