Mail Archives: djgpp-workers/1998/10/08/10:06:28
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 -