WG15 Defect Report Ref: 9945-2-34
Topic: Sed REs

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


Last update: 1997-05-20



	Topic:			Sed REs
	Relevant Sections:
	Classification:		Unaddressed Issue.

Defect Report:

Reference: Page 409, Section, "sed REs".

Was it the intent of the standard to ignore "empty RE's"?
Historic implementations of sed used the empty RE (//) to
match the last RE used.

(Keith Bostic)

WG15 response for 9945-2:1993 
        The meaning of an empty RE is not defined by the standard.

        The standard does not speak to the meaning of a null BRE for
        SED.  The standard is unclear on this issue, and no conformance
        distinction can be made between alternative implementations
        based on this.  This is being referred to the sponsor.


Rationale for Interpretation:

Editorial note for future revision of standard (not part of this interpretation)
A proposed change to the section sed REs is
as follows: add paragraph (3) :

(3) If an RE is empty (i.e., no pattern is specified) sed shall
behave as if the last RE used in the last command applied (either
as an address or as part of a substitute command) was specified.

NOTE: There is no certainty that these comments will apply to any
revision of ISO/IEC 9945-2:1993.