WG15 Defect Report Ref: 9945-2-73
Topic: extended regular expressions


This is an approved interpretation of 9945-2:1993.

.

Last update: 1997-05-20


								9945-2-73

 _____________________________________________________________________________

	Topic:			extended regular expressions
	Relevant Sections:	2.8.4


Defect Report:
-----------------------


Date: Tue, 9 Aug 1994 16:36:15 -0700
From: Fred Zlotnick <[email protected]>

I would like to an request official, binding interpretation from the
WG15 concerning the following point in ISO/IEC 9945-2:1993 (POSIX.2).

Subclause 2.8.4 of POSIX.2 specifies the syntax and semantics of
Extended Regular Expressions.  Subclause 2.8.4.6 describes the effects
of anchoring EREs, including ERE subexpressions.  The language of this
subclause seems to clearly indicate that within ERE subexpressions but
outside of bracket expressions the caret and the dollar sign are always
treated as anchors.

The issue on which I would like an interpretation has to do with nested
anchored subexpressions.  Are such subexpressions valid?  For example,
is the ERE

	^(^(^a$)$)$

a valid expression, and does it match a single line containing only
the character "a"?


Interpretation Response:
------------------------


The rules specified in 2.4.8.3 item 1 and 2.8.4.6 clearly state that this 
is a valid ERE and as suggested shall match the character "a".  Conforming
implementations must conform to this.


Rationale
-------------
None.
Forwarded to Interpretations group: 4 Aug 94

Proposed resolution sent for review: 19th Nov 94
Resolved: 10th Dec 94