Structure_StringProcessing5.9.0
Match
The result of matching a regular expression against a string.
- iOS
- 16.0+
- macOS
- 13.0+
- tvOS
- 16.0+
- watchOS
- 9.0+
@dynamicMemberLookup struct Match
A Match
forwards API to the Output
generic parameter, providing direct access to captures.
Citizens in _StringProcessing
Members
var output: Output
The output produced from the match operation.
let range: Range<String.Index>
The range of the overall match.
subscript<Capture>(ReferenceID
) -> Capture subscript<T>(dynamicMember _: KeyPath<Output, T>
) -> T Accesses a capture by its name or number.
Citizens in _StringProcessing
where Output == AnyRegexOutput
Members
init<OtherOutput>(Regex
<OtherOutput>.Match) Creates a regular expression match with a dynamic capture list from the given match.
subscript(String
) -> AnyRegexOutput.Element? Accesses the capture with the specified name, if a capture with that name exists.
Available in RegexBuilder
Members
subscript<Capture>(Reference
<Capture>) -> Capture Accesses this match’s capture by the given reference.