Matches letters (case insensitive) only.

rx_alpha(.data = NULL, inverse = FALSE)

Arguments

.data

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

inverse

Invert match behavior, defaults to FALSE (match alphabetic characters). Use TRUE to not match alphabetic characters.

Examples

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