re2r (version 0.2.0)

quote_meta: Escapes all potentially meaningful regexp characters in 'unquoted'.

Description

The returned string, used as a regular expression, will exactly match the original string.

Usage

quote_meta(unquoted, parallel = FALSE, grain_size = 1e+05)

Arguments

unquoted

unquoted string

parallel

multithreading support

grain_size

a minimum chunk size for tuning the behavior of parallel algorithms.

Value

quoted string

Examples

Run this code
# NOT RUN {
quote_meta(c("1.2","abc"))
re2_detect("1+2", "1+2")
re2_detect("1+2", quote_meta("1+2"))
re2_detect("1+2", re2("1+2",literal = TRUE))
# }

Run the code above in your browser using DataCamp Workspace