Using only base regex, return a matching string based on the posssibilites entered in extract. Was intended to find a matching string when several possibilites exist. For example, when searching str_extract(c("Case_Two", "Case_One"), "One|Two"), the function will return the found regex in the order they were found in the vector of strings, i.e. c("Two", "One").
1 | str_extract(string, extract)
|
string |
character string or vector containing expressions to look for |
extract |
Regular expression to look for in string |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.