This originally appeared on the Annexe.

If you find sed limiting, you can use Perl instead:

echo something | perl -pe 's/something/else/'

The Perlrun command reference lists the other flags you can use.