the mac os x (BSD) sed expression works OK with GNU sed, so there won't be need for branching and supporting diff versions