stringr (version 0.6.1)

perl: Use perl regular expressions.

Description

This function specifies that a pattern should use the Perl regular expression egine, rather than the default POSIX 1003.2 extended regular expressions

Usage

perl(string)

Arguments

string
pattern to match with Perl regexps

See Also

Other modifiers: fixed, ignore.case

Examples

Run this code
pattern <- "(?x)a.b"
strings <- c("abb", "a.b")
str_detect(strings, pattern)
str_detect(strings, perl(pattern))

Run the code above in your browser using DataCamp Workspace