GNU bug report logs - #68776
bug with escape characters in pattern

Previous Next

Package: grep;

Reported by: Brendan Richardson <brichardson <at> brandeis.edu>

Date: Sun, 28 Jan 2024 08:45:01 UTC

Severity: normal

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: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Brendan Richardson <brichardson <at> brandeis.edu>
Subject: bug#68776: closed (Re: bug#68776: bug with escape characters in
 pattern)
Date: Mon, 29 Jan 2024 02:36:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#68776: bug with escape characters in pattern

which was filed against the grep package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 68776 <at> debbugs.gnu.org.

-- 
68776: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68776
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Brendan Richardson <brichardson <at> brandeis.edu>
Cc: 68776-done <at> debbugs.gnu.org
Subject: Re: bug#68776: bug with escape characters in pattern
Date: Sun, 28 Jan 2024 18:35:35 -0800
On 2024-01-27 16:00, Brendan Richardson wrote:
> If you use input
> egrep "[^\\n\\t]" file
> 
> and the file contains a line with only n or t on it, those lines are also

This is the correct behavior. The command you mention is equivalent to

grep -E '[^nt\]' file

and this outputs all lines containing some character other than 'n', 
't', or '\'. A line containing only n or t should not be output.

[Message part 3 (message/rfc822, inline)]
From: Brendan Richardson <brichardson <at> brandeis.edu>
To: bug-grep <at> gnu.org
Subject: bug with escape characters in pattern
Date: Sat, 27 Jan 2024 19:00:37 -0500
[Message part 4 (text/plain, inline)]
Hello,

If you use input
egrep "[^\\n\\t]" file

and the file contains a line with only n or t on it, those lines are also
excluded
file
normal lines
tttttt
nnnnn



KR
Brendan Richardson
[Message part 5 (text/html, inline)]

This bug report was last modified 1 year and 193 days ago.

Previous Next


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