Backslash is taken at multiple levels.
It's the escape prefix in regular expressions: it makes special characters like . and escape sequences like \s which means any whitespace character.
In order for regular expression character to get a literal backslash, you need to escape the backslash itself.
This is common in many programming languages, some have "raw string literals" where escape sequences are not processed, to avoid having to double the slashes