Re: Regular Expression matching operation =~

2019-09-23 Thread Allodoxaphobia
On Mon, 23 Sep 2019 09:21:44 -0400, Chet Ramey wrote: > On 9/22/19 5:44 PM, Allodoxaphobia 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. > > It's not exactly undocumented,

Re: Regular Expression matching operation =~

2019-09-23 Thread Chet Ramey
On 9/22/19 5:44 PM, Allodoxaphobia 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. It's not exactly undocumented, more undefined. You can't count on the NUL character or the em

Re: Regular Expression matching operation =~

2019-09-22 Thread Grisha Levit
On Sun, Sep 22, 2019 at 9:02 PM Allodoxaphobia 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 depen

Regular Expression matching operation =~

2019-09-22 Thread Allodoxaphobia
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 when an optional command line parameter (a test pattern) was omitted. I boiled down