perl {stringr} | R Documentation |
This function specifies that a pattern should use the Perl regular expression egine, rather than the default POSIX 1003.2 extended regular expressions
perl(string)
string |
pattern to match with Perl regexps |
Other modifiers: fixed
,
ignore.case
pattern <- "(?x)a.b" strings <- c("abb", "a.b") ## Not run: str_detect(strings, pattern) str_detect(strings, perl(pattern))