use ^ in sed as delimiter and make sub global.