I would like to conditionally replace a character sequence in a string in a tab delimited file. It work fine when each string is separated by a new line, but doesn\'t work when