Escape a string for regex

escape_regex(string)

Arguments

string

A string to escape

Value

A string

Examples

escape_regex("library(tidyverse)")
#> [1] "library\\(tidyverse\\)"