Description Usage Arguments Value Note Examples
View source: R/escape_special.R
Prefix the special characters with a blackslash to make them literal characters.
1 | escape_special(x, escape_brace = TRUE)
|
x |
A character vector. |
escape_brace |
A logical value indicating if opening braces should be
escaped. If using R's internal PRCE engine or |
A character vector, with regex meta-characters escaped.
Special characters inside character classes (except caret, hypen and closing bracket in certain positions) do not need to be escaped. This function makes no attempt to parse your regular expression and decide whether or not the special character is inside a character class or not. It simply escapes every value.
1 | escape_special("\\ ^ $ . | ? * + ( ) { } [ ]")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.