View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001757 | Issue 8 drafts | Shell and Utilities | public | 2023-07-15 01:59 | 2024-06-11 09:12 |
Reporter | larryv | Assigned To | |||
Priority | normal | Severity | Editorial | Type | Error |
Status | Closed | Resolution | Accepted | ||
Product Version | Draft 3 | ||||
Name | Lawrence Velázquez | ||||
Organization | |||||
User Reference | |||||
Section | expr | ||||
Page Number | 2895 | ||||
Line Number | 96621 | ||||
Final Accepted Text | |||||
Summary | 0001757: expr: incorrectly describes BRE subexpression as "[\(...\)]" | ||||
Description | The behavior of the expr ':' operator when its pattern operand contains a BRE subexpression is described on page 2895, lines 96620-96623:Alternatively, if the pattern contains at least one regular expression subexpression "[\(...\)]", the string matched by the back-reference expression "\1" shall be returned. If the back-reference expression "\1" does not match, then the null string shell be returned.This implies that subexpressions include or must be enclosed between '[' and ']'. However, as per XBD Section 9.3.5, '[' introduces a bracket expression, within which a subexpression cannot occur (since "\(" is not treated specially). This is the corresponding text from Commands and Utilities, Issue 5, page 337: Alternatively, if the pattern contains at least one regular expression subexpression [\(...\)], the string corresponding to \1 will be returned.It seems clear that '[' and ']' were being used in a parenthetical, not literal, capacity, but Issue 6 (https://pubs.opengroup.org/onlinepubs/009695399/utilities/expr.html) missed that and simply wrapped the whole thing in quotation marks. It's been wrong ever since. | ||||
Desired Action | Change:"[\(...\)]"to: "\(...\)" | ||||
Tags | applied_after_i8d3, tc3-2008 |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-07-15 01:59 | larryv | New Issue | |
2023-07-15 01:59 | larryv | Name | => Lawrence Velázquez |
2023-07-15 01:59 | larryv | Section | => expr |
2023-07-15 01:59 | larryv | Page Number | => 2895 |
2023-07-15 01:59 | larryv | Line Number | => 96621 |
2023-07-18 04:22 | larryv | Note Added: 0006390 | |
2023-07-24 16:28 | Don Cragun | Status | New => Resolved |
2023-07-24 16:28 | Don Cragun | Resolution | Open => Accepted |
2023-07-24 16:29 | Don Cragun | Tag Attached: issue8 | |
2023-07-24 16:31 | Don Cragun | Tag Attached: tc3-2008 | |
2023-07-24 16:31 | Don Cragun | Tag Detached: issue8 | |
2023-08-17 11:04 | geoffclare | Status | Resolved => Applied |
2023-08-17 11:04 | geoffclare | Tag Attached: applied_after_i8d3 | |
2024-06-11 09:12 | agadmin | Status | Applied => Closed |