StructureRegexBuilder5.9.0
Lookahead
A regex component that allows a match to continue only if its contents match at the given location.
- iOS
- 16.0+
- macOS
- 13.0+
- tvOS
- 16.0+
- watchOS
- 9.0+
struct Lookahead<Output>
A lookahead is a zero-length assertion that its included regex matches at a particular position. Lookaheads do not advance the overall matching position in the input string — once a lookahead succeeds, matching continues in the regex from the same position.
Citizens in RegexBuilder
Conformances
protocol RegexComponent
A type that represents a regular expression.
Members
init<R>(R
) Creates a lookahead from the given regex component.
init<R>(() -> R
) Creates a lookahead from the regex generated by the given builder closure.
var regex: Regex<Output>