GNU bug report logs - #16871
problems about matching newline (with -z)

Previous Next

Package: grep;

Reported by: Stephane Chazelas <stephane.chazelas <at> gmail.com>

Date: Tue, 25 Feb 2014 07:33:01 UTC

Severity: wishlist

Full log


Message #11 received at 16871 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Stephane Chazelas <stephane.chazelas <at> gmail.com>, 
 16871 <at> debbugs.gnu.org
Subject: Re: bug#16871: problems about matching newline (with -z)
Date: Thu, 24 Apr 2014 21:27:38 -0700
[Message part 1 (text/plain, inline)]
Stephane Chazelas wrote:
> The doc has a confusing statement ... Same confusion in tests/pcre:

Thanks, I installed the attached patch to fix those.

> We can match a newline with grep -zP 'a\nb' (or '\x0a' or '\012'
> or '[\n]'...) but not easily without -P. Same for NUL
> characters.

Yes, that's a downside of the POSIX notation, and it'd be nice to extend 
POSIX to allow easy matching for newlines and/or null bytes.  I'll mark 
this bug report as a wishlist bug.

[0001-misc-fix-doc-and-test-bugs-re-grep-z.patch (text/plain, attachment)]

This bug report was last modified 8 years and 210 days ago.

Previous Next


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