that's not relevant to the example because $ matches the empty string
at eol, not the character at eol (.$), which is openbsd sed's
interpretation

even in the case of certain regex standards that do not allow $ to be
used as part of a | expression, the interpretation is faulty

On Wed, Jun 15, 2011 at 5:54 PM, Stuart Henderson <[email protected]> wrote:
> On 2011-06-15, Alexander Hall <[email protected]> wrote:
>>> This dif fixes your problem here. Big question is of course: does it
>>> break other cases?
>>
>> It differs from perl like this:
>>
>> $ echo 'l1_1' | perl -pe 's/1|$/X/g'
>> lX_XX
>> $ echo 'l1_1' | sed -E 's/1|$/X/g'
>> lX_X
>>
>> Meaning we don't hit that final '$' if the last match went to eol.
>
> perl regular expressions are expected to behave differently
> to posix REs.

Reply via email to