rx_with_any_case: Control case-insensitive matching.

Description Usage Arguments Details Examples

View source: R/modifiers.R

Description

Control case-insensitive matching.

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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 Nov. 6, 2019, 5:08 p.m.