delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/10/08/10:06:28

Date: Sun, 4 Oct 1998 13:00:31 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Robert Hoehne <robert DOT hoehne AT gmx DOT net>
cc: Andris Pavenis <pavenis AT lanet DOT lv>,
"Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>,
djgpp-workers <djgpp-workers AT delorie DOT com>
Subject: Re: rhide-1.4.6
In-Reply-To: <3614CE10.3C10FE91@gmx.net>
Message-ID: <Pine.SUN.3.91.981004130004.1863f-100000@is>
MIME-Version: 1.0

On Fri, 2 Oct 1998, Robert Hoehne wrote:

> Here follows now a test case where I don't know if it is a bug
> in sed or in the sed-script (maybe Eli can help) or in the
> DJGPP regex function(s).

It's a bug in the script.  It worked with previous versions of Sed
because they use GNU regexp library, which doesn't impose strict Posix
regexp requirements.  In particular, the \+ meta-character is not
supported by the basic regular expressions which is all Sed knows
about.  The GNU regexp library supports \+ as an extension, but
sed.exe was linked with DJGPP's regexp functions which don't have this
extension; that's why gsed.exe works while sed.exe doesn't.

(Personally, I think it's a bad idea to have these extensions silently
supported, because many people aren't aware of the fine differences
between basic and extended regexps, and so this proliferates
non-portable scripts.)

The solution is to use "^[ 	][ 	]*" instead of "^[ 	]\+"
(and if you look into the latest FAQ sources, you will see that I
already bumped into this one when I worked on FAQ v2.11 ;-).

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019