GNU bug report logs -
#39678
'grep --ignore-case --color' does not always color the matches
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Additional note, according to POSIX regex standard:
"An ordinary character is a BRE that matches itself: any character in the
supported character set, except for the BRE special characters listed in
BRE Special Characters.
The interpretation of an ordinary character preceded by an unescaped
<backslash> ( '\\' ) is undefined, except for: [...]"
which means that escaping ordinary characters (like \a) has undefined
behaviour, thus I think it should not be matched.
So having EGexecute match 'a' to '\a' is incorrect, and instead we should
remove the matching and make sure it's not printed. That would make my
patch correct.
Reference:
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_03
Looking forward to feedback.
Best regards,
Tomasz Dziendzielski
pon., 18 paź 2021 o 07:10 Tomasz Dziendzielski <
tomasz.dziendzielski <at> gmail.com> napisał(a):
> Also, even if we assume it should return a match (which I think it
> shouldn't), then there's a second bug in print_line_middle, because why
> would it print anything if there was no match?
>
> Best regards,
> Tomasz Dziendzielski
>
[Message part 2 (text/html, inline)]
This bug report was last modified 3 years and 23 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.