The other change I made is that you do not need to use $+ to separate \t and \n from other text in the replacement parameter of $regsubex.