init(_:_:_:)
Creates a regex component that matches the given component repeated a number of times specified by the given range expression.
Declaration
init<W, C1>(_ component: some RegexComponent, _ expression: some RangeExpression<Int>, _ behavior: RegexRepetitionBehavior? = nil) where Output == (Substring, C1?)Parameters
- component:
The regex component to repeat.
- expression:
A range expression specifying the number of times that
componentcan repeat. - behavior:
The repetition behavior to use when repeating
componentin the match. Ifbehaviorisnil, the default repetition behavior is used, which can be changed fromeagerby callingrepetitionBehavior(_:)on the resultingRegex.