I don't know if this is the only problem, but...
character, giving special meaning to the character it. The \n means "newline" and \t means "tab", etc.
If the following character does not have a special meaning then then the character, alone, is the result. The backslash just disappears.
In order to actually *GET* a backslash, then, you must use a pair of them.
so you needed