# NOT RUN {
rx_any_of(value = "abc")
# create an expression
x <- rx_any_of(value = "abc")
grepl(x, "c") # should be true
grepl(x, "d") # should be false
y <- rx() %>%
rx_find("gr") %>%
rx_any_of("ae") %>%
rx_find("y")
regmatches("gray", regexec(y, "gray"))[[1]]
regmatches("grey", regexec(y, "grey"))[[1]]
# }
Run the code above in your browser using DataLab