fixed sed to use regex instead