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


Message #10 received at 68776-done <at> debbugs.gnu.org (full text, mbox):

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.