rx_with_any_case: Control case-insensitive matching.

View source: R/modifiers.R

rx_with_any_caseR Documentation

Control case-insensitive matching.

Description

Control case-insensitive matching.

Usage

rx_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

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

RVerbalExpressions documentation built on May 29, 2024, 6:47 a.m.