Darwin's sed is weird. Let's try perl.