Control case-insensitive matching.
rx_with_any_case(.data = NULL, enable = TRUE)
.data | Expression to append, typically pulled from the pipe |
---|---|
enable | Whether to enable this behavior |
Equivalent to adding or removing the i modifier.
rx_with_any_case()#> [1] "(?i)"# 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#> [1] TRUE#> [1] FALSE