GNU bug report logs - #20974
Weird newline matching behaviour in --null-data mode

Previous Next

Package: grep;

Reported by: Balazs Kezes <rlblaster <at> gmail.com>

Date: Fri, 3 Jul 2015 17:00:07 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: 20974 <at> debbugs.gnu.org, jim <at> meyering.net, rlblaster <at> gmail.com
Subject: bug#20974: Weird newline matching behaviour in --null-data mode
Date: Sat, 04 Jul 2015 13:40:55 +0900
[Message part 1 (text/plain, inline)]
On Fri, 3 Jul 2015 20:10:08 -0700
Jim Meyering <jim <at> meyering.net> 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.

However, following case is not fixed yet.  Not only '.' but also hat
list (e.g. [^a]) should match newline with -z.  So we need clear
RE_HAT_LISTS_NOT_NEWLINE bit.

$ seq 2 | LC_ALL=C grep --null-data '[1-2][^a][1-2]'
1
2
$ seq 2 | LC_ALL=en_US.iso88591 grep --null-data '[1-2][^a][1-2]'

[0001-grep-z-a-now-consistently-matches-newline.patch (text/plain, attachment)]

This bug report was last modified 9 years and 328 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.