Description Usage Arguments Value Examples
Return first or all regular expression matches
1 2 3 |
x |
Input character vector |
pat |
Regular expression pattern/search string |
perl |
Logical indicating whether to use perl-style regex. If NULL (default) this checks for perl-style expressions. |
... |
Other arguments passed to |
A list containing character vector matches for each input
1 2 3 4 5 | ## find first match
re_match(c("AbC", "dEf"), "[A-Z]")
## find all matches
re_matches(c("AbC", "dEf"), "[A-Z]")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.