init(as:_:)
Creates a capture for the given component using the specified reference.
Declaration
init<W>(as reference: Reference<W>, @RegexComponentBuilder _ componentBuilder: () -> some RegexComponent) where Output == (Substring, W)Parameters
- reference:
The reference to use for anything captured by
component. - componentBuilder:
A builder closure that generates a regex component to capture.