get the right pattern for sed