---
title: "init(_:)"
framework: regexbuilder
role: symbol
role_heading: Initializer
path: "regexbuilder/capture/init(_:)-dm5i"
---

# init(_:)

Creates a capture for the given component.

## Declaration

```swift
init<W, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10>(@RegexComponentBuilder _ componentBuilder: () -> some RegexComponent) where Output == (Substring, W, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10)
```

## Parameters

- `componentBuilder`: A builder closure that generates a regex component to capture.
