StructureRegexBuilder5.9.0
NegativeLookahead
A regex component that allows a match to continue only if its contents do not match at the given location.
- iOS
- 16.0+
- macOS
- 13.0+
- tvOS
- 16.0+
- watchOS
- 9.0+
struct NegativeLookahead<Output>
A negative lookahead is a zero-length assertion that its included regex does not match 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 negative lookahead from the given regex component.
init<R>(() -> R
) Creates a negative lookahead from the regex generated by the given builder closure.
var regex: Regex<Output>