d: Create regex for repeated digits

Description Usage Arguments Value Note Examples

View source: R/internal-string.R

Description

Creates a regex string for repeated digits.

Usage

1
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.

Note

If hi is omitted, the returned regex will only match the exact number of digits given by lo.

Examples

1
2
3
4
5
6
## Not run: 
d(1:5)
d(1:5, 6:8)
d(0:2, Inf)

## End(Not run)

assertive.strings documentation built on May 29, 2017, 11:35 a.m.

Search within the assertive.strings package
Search all R packages, documentation and source code