In Python, I can prefix an r to a string literal (raw string) to tell the interpreter not translate special characters in the string:
r
>>&g
May be of use to a literal regular expression for such purposes.
user=> #"abc\nsdf#$%\^" #"abc\nsdf#$%\^" user=> (type #"abc\nsdf#$%\^") java.util.regex.Pattern user=> (println (str #"abc\nsdf#$%\^")) abc\nsdf#$%\^ nil