rx_digit {RVerbalExpressions} | R Documentation |
Match a digit (0–9).
Description
The function rx_digit()
looks for tabs with the following
expression: %%d
and matches single digit. Plural version matches
specified number of digits n
(equivalent to rx_digit() %>% rx_count(n)
).
Usage
rx_digit(.data = NULL, inverse = FALSE)
Arguments
.data |
Expression to append, typically pulled from the pipe |
inverse |
Invert match behavior, defaults to |
Examples
rx_digit()
rx_digit(inverse = TRUE)
# create an expression
x <- rx_digit()
# create input
string <- "1 apple"
# extract match
regmatches(string, regexpr(x, string))
[Package RVerbalExpressions version 0.1.1 Index]