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

# init(_:)

Creates a capture for the given component.

## Declaration

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

## Parameters

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