Control case-insensitive matching.

with_any_case(.data = NULL, enable = TRUE)

Arguments

.data

Expression to append, typically pulled from the pipe %>%

enable

Whether to enable this behavior

Details

Equivalent to adding or removing the i modifier.

Examples

with_any_case()
#> [1] "(?i)"
# case insensitive x <- find(value = "abc") %>% with_any_case() # case sensitive y <- find(value = "abc") %>% with_any_case(enable = FALSE) grepl(x, "ABC") # should be true
#> [1] TRUE
grepl(y, "ABC") # should be false
#> [1] FALSE