Matches both letters (case insensitive) and numbers (a through z and 0 through 9).
rx_alnum(.data = NULL, inverse = FALSE)
.data | Expression to append, typically pulled from the pipe |
---|---|
inverse | Invert match behavior, defaults to |
rx_alnum()#> [1] "[A-z0-9]"rx_alnum(inverse = TRUE)#> [1] "[^A-z0-9]"# create an expression x <- rx_alnum() # create input string <- "Apple 1!" # extract match regmatches(string, gregexpr(x, string))#> [[1]] #> [1] "A" "p" "p" "l" "e" "1" #>