number_range

0th

Percentile

Generate a regular expression for a number range.

Generates a regular expression that matches a sequence of numbers.

Usage
number_range(lo, hi, allow_leading_zeroes = FALSE, capture = FALSE)
Arguments
lo
An integer.
hi
An integer greater than or equal to lo.
allow_leading_zeroes
A logical value. Are leading zeroes allowed to bulk the match up to the length of the number with the most digits?
capture
A logical value. See or for details.
Value

A character vector representing part or all of a regular expression.

Aliases
  • number_range
Examples
number_range(0, 255)
number_range(0, 255, allow_leading_zeroes = TRUE)
number_range(10000, 19999)
number_range(6, 54321)
number_range(-77, 77)
number_range(-77, 77, capture = TRUE)
number_range(-77, 77, capture = NA)
Documentation reproduced from package rebus.numbers, version 0.0-1, License: Unlimited

Community examples

Looks like there are no examples yet.