rx_either_of | R Documentation |
Expression to match instead. If both expressions exists, both
will be returned. This just adds the vertical bar |
often called an
alternator which allows the user to find this or that, or both!
rx_either_of(.data, ...)
.data |
Expression to append, typically pulled from the pipe |
... |
A character vector |
x <- rx() %>%
rx_either_of("cat", "dog") %>%
rx_space() %>%
rx_find("food")
string <- c("dog food", "cat food", "fish food")
grep(x, string, value = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.