R/escapeRegex_(from_Hmisc).R
escapeRegex.Rd
Escapes any characters that would have special meaning in a reqular expression.
escapeRegex(string)
string being operated on.
The value of the string with any characters that would have special meaning in a reqular expression escaped.
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.
Note that this function was copied literally from the Hmisc
package (to prevent importing the entire package for one line of code).