Use of the information contained in this unapproved document is at your own risk
.Last update: 20 April,2001
1003.2-92 #82 _____________________________________________________________________________ Interpretation Number: XXXX Topic: BRE Relevant Sections: 2.8.3 Interpretation Request: (Defect Report) ----------------------- Date: Fri, 7 Oct 1994 15:25:05 -0700 Interpretation Request: (Defect Report) ----------------------- I would like to request an official, binding interpretation from the IEEE concerning the following point in IEEE Std 1003.2-1992 (POSIX.2). POSIX.2 Subclause 2.8.3.3 item (3) specifies the semantics of backreference expressions in Basic Regular Expressions. This section states in part: The backreference expression \n shall match the same (possibly empty) string of characters as was matched by a subexpression enclosed between \( and \) preceding the \n. Suppose that the subexpression includes an anchor, and suppose that the system in question is one on which anchoring characters act as anchors in subexpressions. Does the backreference expression have to match an anchored string? (In this case, it can never match anything unless the first subexpression matched an empty string.) For example, on such a system does the BRE \(^b\)\1 match the first two characters of bbbbb or is the BRE to be treated as equivalent to \(^b\)\(^b\) (in which case it will not match)? Thank you for your attention to this matter. Interpretation response: ------------------------- The standard clearly states the behaviour for BREs, and conforming implementations must conform to this. In the example provided, the standard permits matching, but does not require it. Rationale ------------- None. Forwarded to Interpretations group: 09 Oct 94 Proposed resolution sent for review: 19th Nov 94 Resolved: 10th Dec 94