fix some regexes that used \r or \n instead of \\r and \\n

It works with the single-backslash variant, but it is not clean.
In a regex the \r and \n should be correctly escaped and given to the regex engine.
This is e. g. also important if you use an IDE that lets you edit regexes "after the string escaping" like IntelliJ IDEA.