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
Yep, it gets hairy when you need to do this sort of thing, doesn't it.
The reason you need so many backslashes is that you need to take into account that backslash is used for both escaping a string and for escaping a regex.
That makes 8.