subscript(_:)

Accesses the capture with the specified name, if a capture with that name exists.

iOS
16.0+
macOS
13.0+
tvOS
16.0+
watchOS
9.0+
subscript(name: String) -> AnyRegexOutput.Element? { get }

Parameters

name

The name of the capture to access.

Returns

An element providing information about the capture, if there is a capture named name; otherwise, nil.