bug#20974: Weird newline matching behaviour in --null-data mode

2015-07-04 Thread Paul Eggert
Norihiro Tanaka wrote: Not only '.' but also hat list (e.g. [^a]) should match newline with -z. So we need clear RE_HAT_LISTS_NOT_NEWLINE bit. Thanks for reporting that. I also noticed some related bugs in dfa.c that 'grep' does not exercise (so no grep test cases, alas). Plus, it's long be

bug#20974: Weird newline matching behaviour in --null-data mode

2015-07-03 Thread Norihiro Tanaka
On Fri, 3 Jul 2015 20:10:08 -0700 Jim Meyering wrote: > Oh, nice! I see that Paul Eggert has just fixed this with > the following patch: > http://git.sv.gnu.org/cgit/grep.git/commit/?id=0e8fda0d880cccd0 > > So I'm closing this ticket. > Paul's fix is very nice, I could not found it. Howeve

bug#20974: Weird newline matching behaviour in --null-data mode

2015-07-03 Thread Jim Meyering
On Fri, Jul 3, 2015 at 8:03 PM, Jim Meyering wrote: > On Fri, Jul 3, 2015 at 9:59 AM, Balazs Kezes wrote: >> Hello! >> >> I'm running into issues with grep in -z mode. I've managed to minimize >> it into this: >> >> $ seq 2 | grep --null-data --quiet '[12].2' ; echo $? >> 0 >>

bug#20974: Weird newline matching behaviour in --null-data mode

2015-07-03 Thread Jim Meyering
On Fri, Jul 3, 2015 at 9:59 AM, Balazs Kezes wrote: > Hello! > > I'm running into issues with grep in -z mode. I've managed to minimize > it into this: > > $ seq 2 | grep --null-data --quiet '[12].2' ; echo $? > 0 > $ seq 2 | grep --null-data --quiet '[1-2].2' ; echo $? >

bug#20974: Weird newline matching behaviour in --null-data mode

2015-07-03 Thread Norihiro Tanaka
On Fri, 3 Jul 2015 17:59:19 +0100 Balazs Kezes wrote: > I'm running into issues with grep in -z mode. I've managed to minimize > it into this: > > $ seq 2 | grep --null-data --quiet '[12].2' ; echo $? > 0 > $ seq 2 | grep --null-data --quiet '[1-2].2' ; echo $? > 1 > > I

bug#20974: Weird newline matching behaviour in --null-data mode

2015-07-03 Thread Balazs Kezes
Hello! I'm running into issues with grep in -z mode. I've managed to minimize it into this: $ seq 2 | grep --null-data --quiet '[12].2' ; echo $? 0 $ seq 2 | grep --null-data --quiet '[1-2].2' ; echo $? 1 I'd expect the two expressions to mean the same. I've tried