<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/AnyRegexOutput/Element",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:17_StringProcessing14AnyRegexOutputV7ElementV"
  },
  "title" : "AnyRegexOutput.Element"
}
-->

# AnyRegexOutput.Element

An individual match output value.

```
struct Element
```

## Topics

### Instance Properties

[`var name: String?`](/documentation/Swift/AnyRegexOutput/Element/name)

The name of this capture, if the capture is named.

[`var range: Range<String.Index>?`](/documentation/Swift/AnyRegexOutput/Element/range)

The range over which a value was captured, if there was a capture.

[`var substring: Substring?`](/documentation/Swift/AnyRegexOutput/Element/substring)

The slice of the input which was captured, if there was a capture.

[`var type: any Any.Type`](/documentation/Swift/AnyRegexOutput/Element/type)

The type of this capture.

[`var value: Any?`](/documentation/Swift/AnyRegexOutput/Element/value)

The captured value, if there was a capture.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)