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: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#68776: closed (bug with escape characters in pattern)
Date: Mon, 29 Jan 2024 02:36:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 28 Jan 2024 18:35:35 -0800
with message-id <325fad6c-cc51-4cf9-ab8a-55d6f57c8635 <at> cs.ucla.edu>
and subject line Re: bug#68776: bug with escape characters in pattern
has caused the debbugs.gnu.org bug report #68776,
regarding bug with escape characters in pattern
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> 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: 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 3 (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 4 (text/html, inline)]
[Message part 5 (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.


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.