Is there a complete list of regex escape sequences somewhere? I found this, but it was missing \\ and \e for starters. Thus far I have come up with this regex pattern that hopefully matches all the escape sequences:
@"\\([bBdDfnreasStvwWnAZG\\]|x[A-Z0-9]{2}|u[A-Z0-9]{4}|\d{1,3}|k<\w+>)"
Alternatively, if you only want to escape a string correctly, you could just depend on
Regex.Escape()which will do the necessary escaping for you.Hint: There is also a
Regex.Unescape()