Contents

prefixMatch(of:)

Matches part of the regex, starting at the beginning, where the regex is created by the given closure.

Declaration

func prefixMatch<Output>(@RegexComponentBuilder of content: () -> some RegexComponent) -> Regex<Output>.Match?

Parameters

  • content:

    A closure that returns a regex to match against.

Return Value

The match if there is one, or nil if none.