assertive.strings (version 0.0-3)

d: Create regex for repeated digits

Description

Creates a regex string for repeated digits.

Usage

d(lo, hi = NA_integer_, optional = FALSE)

Arguments

lo
Minimum number of digits to match.
hi
Optional maximum number of digits to match.
optional
If TRUE, the digits are optional.

Value

A character vector of regexes.

Examples

Run this code
## Not run: 
# d(1:5)
# d(1:5, 6:8)
# d(0:2, Inf)
# ## End(Not run)

Run the code above in your browser using DataCamp Workspace