bug#22655: grep-2.21 (and git master): --null-data and ranges work in an odd way (-P works fine)

2016-02-20 Thread Jim Meyering
On Sun, Feb 14, 2016 at 12:02 PM, Ulya Fokanova wrote: > I've explored the following case: > >$ printf '12\n34\0' | LC_ALL=en_US.utf-8 grep -z '^[1-4]*$' | wc -c >6 > > It's a bug (there should be no match). > > This is what grep does: > > * triesto build DFA (as indfa.c) > * fails to ex

bug#22655: grep-2.21 (and git master): --null-data and ranges work in an odd way (-P works fine)

2016-02-20 Thread Jim Meyering
On Sat, Feb 20, 2016 at 8:19 PM, Jim Meyering wrote: ... >> The bug also present with PCRE engine: >> >>$ printf '12\n34\0' | LC_ALL=en_US.utf-8 grep -z -P '^[1234]*$' | wc -c >>6 >>$ printf '12\n34\0' | LC_ALL=en_US.utf-8 grep -z -P '^[1-4]*$' | wc -c >>6 > > Thank you for the ana