When assigning string values in Lua, you must properly escape certain special characters or you may have unexpected results. For example, if I want to define a string variable to contain "C:\Windows\notepad.exe", I have to write it like this:
strTestString = "C:\\Windows\\Notepad.exe"
If I don't escape the backslashes, "C:\Windows\notepad.exe" literally looks like this to Lua:
"C:Windows otepad.exe"
Lua simply ignores unknown escape sequences like "\W" and drops the backslash. While the "\n" (from "..\notepad..") is interpreted as a new line.
Click the following link for a full list of Lua escape sequences: