repetitionBehavior(_:)
Returns a regular expression where quantifiers use the specified behavior by default.
Declaration
func repetitionBehavior(_ behavior: RegexRepetitionBehavior) -> Regex<Regex<Output>.RegexOutput>Parameters
- behavior:
The default behavior to use for quantifiers.
Discussion
This setting does not affect calls to quantifier methods, such as OneOrMore, that include an explicit behavior parameter.
Passing .eager or .reluctant to this method corresponds to applying the (?-U) or (?U) option in regex syntax, respectively.