GNU bug report logs - #20957
2.21 bug in handling at least one -P regular expression

Previous Next

Package: grep;

Reported by: vampyrebat <at> gmail.com

Date: Thu, 2 Jul 2015 07:56:02 UTC

Severity: normal

Found in version 2.21

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: vampyrebat <at> gmail.com
To: 20957 <at> debbugs.gnu.org
Subject: bug#20957: 2.21 bug in handling at least one -P regular expression
Date: Thu, 02 Jul 2015 02:55:28 -0500
grep 2.21 incorrectly handles a -P regular expression that 2.20 handled correctly.  Thanks for looking into this.

$ cat file
Here's a line.

This line has one blank line above it.


This line has two blank lines above it.



This line has three blank lines above it.




This line has four blank lines above it.

$ grep-2.20/src/grep -Pzo '(?<=\n\n\n).*' file
This line has two blank lines above it.
This line has three blank lines above it.
This line has four blank lines above it.
$ grep-2.21/src/grep -Pzo '(?<=\n\n\n).*' file
This line has two blank lines above it.




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

Previous Next


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