Hello list,

I have an issue with sed. Why does

        echo 'ab' | sed -E 's/a|$/x/g'

give 'x' whereas

        echo 'ab' | perl -e 'my $var = <>; $var =~ s/a|$/x/g; print $var'

and GNU's sed yield 'xbx' (which I expected to be the result in the
first case)?

Thanks
Nils

Reply via email to