escapeRegex.RdEscapes any characters that would have special meaning in a reqular expression.
escapeRegex(string)
escapeBS(string)escapeRegex will escape any characters that would have
special meaning in a reqular expression. For any string
grep(regexpEscape(string), string) will always be true.
escapeBS will escape any backslash \ in a string.
The value of the string with any characters that would have special meaning in a reqular expression escaped.
string <- "this\\(system) {is} [full]."
escapeRegex(string)
#> [1] "this\\\\\\(system\\) \\{is\\} \\[full\\]\\."
escapeBS(string)
#> [1] "this\\\\(system) {is} [full]."