firstMatch(of:)
Returns the first match for the regex within this collection, where the regex is created by the given closure.
Declaration
func firstMatch<Output>(@RegexComponentBuilder of content: () -> some RegexComponent) -> Regex<Output>.Match?Parameters
- content:
A closure that returns the regex to search for.
Return Value
The first match for the regex created by content in this collection, or nil if no match is found.