Description Usage Arguments Details Value Examples
Generate a Regular Expression for Finding Any of a Vector of Patterns
1 |
pattern |
A character vector containing a series of words or stringi-search-regexs, any one of which is sufficient for a match |
match_vector
is a convenience function that creates a regular expression pattern for finding any of a vector of words (or other regular expression patterns)
A regular expression pattern
1 2 3 4 5 | colors <- c("red", "blue", "yellow")
sentences <- c("The car parked by their house was red",
"The yellow cat enjoys the sun atop the car's roof",
"The blue city bus passed right by the stopped car")
stringr::str_detect(sentences, match_vector(colors))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.