Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15406
| From | Grisha Levit <grishalevit@gmail.com> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: Regular Expression matching operation =~ |
| Date | 2019-09-23 01:01 -0400 |
| 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> |
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
Re: Regular Expression matching operation =~ Grisha Levit <grishalevit@gmail.com> - 2019-09-23 01:01 -0400
csiph-web