bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sed POSIX compatibility regarding '|' in regular expressions


From: Paolo Bonzini
Subject: Re: sed POSIX compatibility regarding '|' in regular expressions
Date: Thu, 14 Dec 2006 15:31:25 +0100
User-agent: Thunderbird 1.5.0.8 (Macintosh/20061025)

Bruno Haible wrote:
Hi,

POSIX states in [1], section "Regular Expressions in sed", that sed uses
basic regular expressions, with three minor modifications. The syntax
of basic regular expressions is defined in [2]. According to the text
and to the "RE and Bracket Expression Grammar" section at the end of this
page, POSIX BREs don't support alternation. "The interpretation of an ordinary
character preceded by a backslash ( '\' ) is undefined" - so this means
that the use of '\|' in BREs is a GNU extension.

Bug #1: The --posix option fails to turn off this GNU extension.

This is not a bug, as Eric already explained.

As for the build failures, I think that the complete switch to gnulib has fixed them (from last September, see CVS sed). Actually, at the time 4.1.5 was released regex was taken from GNU libc, and you know how careful Uli is about portability for code in the glibc repository. :-) I will find time to prepare a new release soon.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]