Re: [hackers] [sbase] [PATCH 3/3] ed: Fix substitutions with non-determinate patterns

From: Wolfgang Corcoran-Mathe <>
Date: Tue, 26 Jul 2016 15:23:57 -0400


Quoth Quentin Rameau:
>> Right, and the same behavior is shown by all the seds I’ve seen (GNU,
>> BSD, Busybox & Plan 9). Interestingly, both GNU and BSD ed give an
>> error instead (for global substitution against a null-matching regex).
>What is “BSD”? Are you talking about BSD 4.4?
>OpenBSD's sed surely gives the same result as our sbase sed.


OpenBSD’s sed gives the same result as sbase sed. OpenBSD’s _ed_ gives
an error.

>But in "glorious" there isn't an ethereal null string between each
>character, so in addition to be an unexpected result it isn't correct to
>get a replacement of "PgPlPoPrPiPoPuPsP".

It’s outside of the (s)ed line-oriented world of data, but sam(1) (with
its more enlightened definitions of regexes) assumes these ethereal null

Received on Tue Jul 26 2016 - 21:23:57 CEST

This archive was generated by hypermail 2.3.0 : Tue Jul 26 2016 - 21:24:20 CEST