Contents

matches(of:)

Returns a collection containing all non-overlapping matches of the regex, created by the given closure.

Declaration

func matches<Output>(@RegexComponentBuilder of content: () -> some RegexComponent) -> [Regex<Output>.Match]

Parameters

  • content:

    A closure that returns the regex to search for.

Return Value

A collection of matches for the regex returned by content. If no matches are found, the returned collection is empty.