support \U and \L anywhere in replacement string