Anonymous | Login | 2024-10-14 23:29 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||
ID | Category | Severity | Type | Date Submitted | Last Update | ||
0001139 | [1003.1(2013)/Issue7+TC1] Base Definitions and Headers | Objection | Enhancement Request | 2017-05-02 14:08 | 2024-06-11 08:54 | ||
Reporter | stephane | View Status | public | ||||
Assigned To | |||||||
Priority | normal | Resolution | Accepted As Marked | ||||
Status | Closed | ||||||
Name | Stephane Chazelas | ||||||
Organization | |||||||
User Reference | |||||||
Section | 9.3.2 BRE Ordinary Characters (and same for ERE) | ||||||
Page Number | 183 and below | ||||||
Line Number | 6044 and below | ||||||
Interp Status | --- | ||||||
Final Accepted Text | Note: 0004149 | ||||||
Summary | 0001139: require RE \] to match ] when outside bracket expressions | ||||||
Description |
Currently, since `]` is an ordinary character, the behaviour for grep '\[foo\]' is "undefined". POSIX tells us to do: grep '\[foo]' instead. However, it's very common for people to write grep '\[foo\]' when they meant grep '\[foo]' and no BRE implementation that I know treats \] any different from ] there. So I'd suggest this be engraved in the spec, that BRE \] be *required* to match a "]" when outside bracket expressions (note: I'd rather [xy\] be unspecified, favouring the more portable [xy\\] instead but that would be a separate issue). Same applies to ERE \] and \} |
||||||
Desired Action |
The enhancement request is not for ] (and } in EREs) to be considered as "special characters", but for \] and \} to be guaranteed to match the ] and } respectively so the common "grep '\[x\]'" becomes standard/portable. That is, prohibit implementations from implementing extensions that would treat \] and ERE \} specially (very unlikely that they would anyway given that \[ and ERE \{ are required by POSIX to match [ and {). Changes (requested additions in {{...}}) 9.3.1: a special character {{or ']'}} preceded by[...] 9.3.2: {{* the ']' character outside of bracket expressions, "\]" being required to match a ']' character}} 9.4.1: "a special character{{, ']' or '}'}} preceded by"[...] 9.4.2: ordinary character{{ except ']' and '}'}} preceded by[...] "\]" and "\}" shall match the ']' and '}' characters respectively. 9.5.1: add \] to QUOTED_CHAR in BREs, and \] and \} in EREs |
||||||
Tags | issue8 | ||||||
Attached Files | |||||||
|
Issue History | |||
Date Modified | Username | Field | Change |
2017-05-02 14:08 | stephane | New Issue | |
2017-05-02 14:08 | stephane | Name | => Stephane Chazelas |
2017-05-02 14:08 | stephane | Section | => 9.3.2 BRE Ordinary Characters (and same for ERE) |
2017-05-02 14:08 | stephane | Page Number | => 183 and below |
2017-05-02 14:08 | stephane | Line Number | => 6044 and below |
2018-10-12 10:49 | geoffclare | Note Added: 0004149 | |
2018-10-18 15:30 | geoffclare | Note Edited: 0004149 | |
2018-10-18 15:31 | geoffclare | Interp Status | => --- |
2018-10-18 15:31 | geoffclare | Final Accepted Text | => Note: 0004149 |
2018-10-18 15:31 | geoffclare | Status | New => Resolved |
2018-10-18 15:31 | geoffclare | Resolution | Open => Accepted As Marked |
2018-10-18 15:31 | geoffclare | Tag Attached: issue8 | |
2020-04-23 13:11 | geoffclare | Status | Resolved => Applied |
2024-06-11 08:54 | agadmin | Status | Applied => Closed |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |