---
title: "subscript(_:)"
framework: swift
role: symbol
role_heading: Instance Subscript
path: "swift/regex/match/subscript(_:)-vbin"
---

# subscript(_:)

Accesses this match’s capture by the given reference.

## Declaration

```swift
subscript<Capture>(reference: Reference<Capture>) -> Capture { get }
```
