Probably depends on which specificRegeximplementation you are using!
But, generally, characters that have a "special" meaning in Regex are escaped by prepending a \ character. Though keep in mind that the \ character already acts as an escape character C/C++ string literals!
For example, the following Regex matches any (non-empty) sequence of characters: .+
...because the . is a "wildcard" character in Regex.
At the same time, this Regex only matches a sequence of literal dot (.) characters: \.+
And, written as a C/C++ string literal, the above Regex then becomes: "\\.+"
...because, in a C/C++ string literal, the sequence \\ translates to a single \ character.