Extract patterns from a string
Arguments
- string
Character vector of strings.
- pattern
A pattern to match. Can be:
A single string or
regex(), to use POSIX 1003.2 extended regular expression.fixed()to use a fixed/literal matchi.perl()to use a Perl-compatible regular expression.
Unlike stringr,
patternmust be length 1; it will not be recycled to the same length asstring.