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


Groups > gnu.bash.bug > #15406

Re: Regular Expression matching operation =~

Path csiph.com!3.us.feeder.erje.net!feeder.erje.net!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Grisha Levit <grishalevit@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: Regular Expression matching operation =~
Date Mon, 23 Sep 2019 01:01:35 -0400
Lines 14
Approved bug-bash@gnu.org
Message-ID <mailman.828.1569214911.2190.bug-bash@gnu.org> (permalink)
References <slrnqofqq2.43b.trepidation@vps.jonz.net> <CAMu=Bro6fMaj=0p+kF1WM34=8J3KHWduVi7Qhwcfp=YSVQVPfw@mail.gmail.com>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
X-Trace usenet.stanford.edu 1569214912 7146 209.51.188.17 (23 Sep 2019 05:01:52 GMT)
X-Complaints-To action@cs.stanford.edu
To bug-bash <bug-bash@gnu.org>
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=rkZzlfiEhyDoWCQaNrrJYXSGOuOfFkf5HPrqbd6sgwQ=; b=CmOISuNqL9uBfMImfxGdnCssQbWaA6FRwtePRP150e8be7fN7WL46nBikzkXFOBh62 1azKQpcs0C0uPmGf9BIv04LISBOSN91VXhkoZxvRm0p2il9Zy48LSWgzUhqQun6UKc8c 56KbF7t7PPVH9g2uiz5MTeMVxUMq8Vvl+MEUhn8QFSLNqyodcPGW0x0I8fsjeE9iVBvU XPEKwgjDROuPQYoUfkDYtjrcuV5ufzt0rvRrSEAmucJMWe13b79CF+8gdOxP/YFQiA0q 9uoKMYq3/EOefNDkLUsaVQD+XmV0RH8bEwUeV8u0BXMw7sUhHIBX8HW7fSOygtoLFWoU PLjw==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=rkZzlfiEhyDoWCQaNrrJYXSGOuOfFkf5HPrqbd6sgwQ=; b=AvyuArnQw6iAhEMC2EgQHUD+LvO7OheygO0J9t7AzQuvJyjCxz06Z4MJfJQU7T/a20 P3kJClq60c1+4ShNiJlrztB63yf3itK0cbEnfQInz77lPJ0wGEhjtwoKoceWoYWVYIIB oWrcSe8CYnF/ya/o1JUyJGpVtmbbPxwYKA3XGR+cS/ZW0+/CrdeEDKHXMCs8rd20buPM SsRW/2WSMpzYO8e7vcnRHCd98RlAgU0RrGuqK38NFhhOEmZ2H9PBnBKpLBlIMqDG/ZoI SQuqEtLhg4H5GWHjrxmzkqXpmtrF5Pns8M4f50kRUQUmjDWGXt63daDz7MZWUFyTZbn0 8QTw==
X-Gm-Message-State APjAAAUc4Zx8z6piKj5F9jJYqXl+E0mTytVonbX1nOp3DTASwA8A/uD1 Kotk5tENrXrkYitg3qhhvJPZBmMNFUoKj2KuWCZ4ixye
X-Google-Smtp-Source APXvYqxn2wtG5Ky+DvIrmkFEbjucYJu5Ox942yXMW/PycLsJj7LAIiZ4jh2Q+2pfy7IaEqmEiyE9p1GdqL0JBiRFD/g=
X-Received by 2002:ac8:53c3:: with SMTP id c3mr15108024qtq.273.1569214906354; Sun, 22 Sep 2019 22:01:46 -0700 (PDT)
In-Reply-To <slrnqofqq2.43b.trepidation@vps.jonz.net>
X-detected-operating-system by eggs.gnu.org: Genre and OS details not recognized.
X-Received-From 2607:f8b0:4864:20::832
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 <CAMu=Bro6fMaj=0p+kF1WM34=8J3KHWduVi7Qhwcfp=YSVQVPfw@mail.gmail.com>
X-Mailman-Original-References <slrnqofqq2.43b.trepidation@vps.jonz.net>
Xref csiph.com gnu.bash.bug:15406

Show key headers only | View raw


On Sun, Sep 22, 2019 at 9:02 PM Allodoxaphobia <trepidation@example.net> wrote:
>
> In moving a bash ver. 4.3.48 (Ubuntu) program to a bash ver. 5.0.11
> (FreeBSD) environment I encountered either a bug, a quirk, or
> an undocumented feature.
>
> I was using a null regexp as a "match for anything" case

This behavior depends on the OS's underlying regex implementation.
For example BSD says (man 3 regex, under IMPLEMENTATION CHOICES):

    An empty parenthesized subexpression, `()', is legal and matches an empty
    (sub)string.  An empty string is not a legal RE.

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


Thread

Re: Regular Expression matching operation =~ Grisha Levit <grishalevit@gmail.com> - 2019-09-23 01:01 -0400

csiph-web