rx_with_any_case()
# case insensitive
x <- rx() %>%
rx_find("abc") %>%
rx_with_any_case()
# case sensitive
y <- rx() %>%
rx_find("abc") %>%
rx_with_any_case(enable = FALSE)
grepl(x, "ABC") # should be true
grepl(y, "ABC") # should be false
Run the code above in your browser using DataLab