This is a \"what the heck is going on here\" question. I don\'t actually need a solution.
I had to replace all single backslashes in a String with double backslashe
"\\\\\\\\" leads to an in memory representation of a string with 4 backslashes: \\\\. Although the second string isn't a regex string, backslashes and dollar signs are still special characters in it, so they need to be escaped.
"\\\\\\\\"
\\\\