Matches upper case letters only.

rx_uppercase(.data = NULL, inverse = FALSE)

Arguments

.data

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

inverse

Invert match behavior, defaults to FALSE (match upper case). Use TRUE to not match upper case.

Examples

rx_uppercase()
#> [1] "[A-Z]"
rx_uppercase(inverse = TRUE)
#> [1] "[^A-Z]"
# create an expression x <- rx_uppercase() y <- rx_uppercase(inverse = TRUE) # create input string <- "Apple 1!" # extract match regmatches(string, gregexpr(x, string))
#> [[1]] #> [1] "A" #>
regmatches(string, gregexpr(y, string))
#> [[1]] #> [1] "p" "p" "l" "e" " " "1" "!" #>