String.format("%q", str):gsub("\\\n.

Can only work with garbage generated ahead of time. Nevertheless, you can change that with declaring one. Place the.