Match a digit (0–9).
digit(.data = NULL)
.data | Expression to append, typically pulled from the pipe |
---|
This function is looks for tabs with the following expression:
\d
digit()#> [1] "\\d"# create an expression x <- digit() # create input string <- "1 apple" # extract match regmatches(string, regexpr(x, string))#> [1] "1"