<!--
{
  "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/Regex/Match/init(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:17_StringProcessing5RegexV5MatchVA2A03AnyC6OutputVRszlEyAEyAG_GAEyqd___Gclufc"
  },
  "title" : "init(_:)"
}
-->

# init(_:)

Creates a regular expression match with a dynamic capture list from the
given match.

```
init<OtherOutput>(_ match: Regex<OtherOutput>.Match)
```

## Parameters

`match`

A regular expression match to convert to a match with
type-erased captures.

## Discussion

You can use this initializer to convert a `Regex.Match` with
strongly-typed captures into a match with the type-eraser `AnyRegexOutput`
as its output type.

---

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)