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


Groups > gnu.bash.bug > #15388

Re: Incorrect example for `[[` command.

Path csiph.com!weretis.net!feeder6.news.weretis.net!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Ilkka Virta <itvirta@iki.fi>
Newsgroups gnu.bash.bug
Subject Re: Incorrect example for `[[` command.
Date Sat, 21 Sep 2019 12:34:39 +0300
Lines 22
Approved bug-bash@gnu.org
Message-ID <mailman.713.1569058490.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>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace usenet.stanford.edu 1569058491 4849 209.51.188.17 (21 Sep 2019 09:34:51 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash@gnu.org
To hk <hkadeveloper@gmail.com>
Envelope-to bug-bash@gnu.org
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:60.0) Gecko/20100101 Thunderbird/60.9.0
In-Reply-To <CAD0rTC68qoXvCV9SLP1dJ8Gvg71W7bg9yt8jjpmpESK-jKD7Wg@mail.gmail.com>
Content-Language en-US
X-SASI-RCODE 200
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; h=subject:to:cc:references:from:message-id:date:mime-version:in-reply-to:content-type:content-transfer-encoding; s=smtp; bh=AckL1PGagFKYjWIb1xkSn5/CYOdzusg4w4uBYUitrIA=; b=mEMONZXhgLMgQlAlbuxmTren/7pelh8qab5KcZIa8X1vnTbRSWdJDCK8ykzhX8bchkA+/AhZswob4lbqkeaT/2hA7NWzUwU9h91GjduK+rea2l0DgbR5M2AQC8DnE1gWzP23cnvtjuAIvvTiG8B8oLc7Hn4a+4sf7AEg/z1e2BlxiHfeYP9EWlvypZMr2vpz8tiVEx+HyferQn7pp2il4holqf14YC5y+X1ssml10koB8v4C8CQFoTde4gbNawoSLoMBickOahoPRFm/lxPHJWaIs6XvdL81v4enLKpDYLm3lFOgOxrUck4e/ckq2YFGqYtBXxGgSvWEXaiqiq2DQg==
X-detected-operating-system by eggs.gnu.org: FreeBSD 8.x
X-Received-From 157.24.2.104
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <bf5a1810-8316-239c-0c5a-f85803048ab6@iki.fi>
X-Mailman-Original-References <CAD0rTC7W20s7-8np7Z+CmZQczTQ+LX=Y1x01gAenewrpiJS5jw@mail.gmail.com> <8e7c8ea4-2fdf-4809-0b50-ea1bfbbec165@case.edu> <CAD0rTC68qoXvCV9SLP1dJ8Gvg71W7bg9yt8jjpmpESK-jKD7Wg@mail.gmail.com>
Xref csiph.com gnu.bash.bug:15388

Show key headers only | View raw


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.

https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/basedefs/V1_chap09.html


-- 
Ilkka Virta / itvirta@iki.fi

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


Thread

Re: Incorrect example for `[[` command. Ilkka Virta <itvirta@iki.fi> - 2019-09-21 12:34 +0300

csiph-web