|
From: | Paul Eggert |
Subject: | "grep '\]'" warnings suggest a Gnulib DFA patch |
Date: | Fri, 3 Jun 2022 18:54:34 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 |
https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=762bd0aa660b0c1c02597e0d2e5c5fbf9bab1b91Even though POSIX says the interpretation of \] is undefined (which means the Gnulib patch is helpful), it's unlikely that any POSIX-conforming regular expression matcher would do anything other than treat \] like plain ]. And this suggests that GNU grep's warning about \] is perhaps more trouble than it's worth.
So, what do you think of the idea of not warning for this particular stray backslash? Proposed Gnulib patch attached, with the idea of propagating this into GNU grep before its upcoming release. I haven't installed this.
0001-dfa-do-not-warn-about.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |