---
title: "init(_:count:)"
framework: regexbuilder
role: symbol
role_heading: Initializer
path: "regexbuilder/repeat/init(_:count:)-2domp"
---

# init(_:count:)

Creates a regex component that matches the given component repeated the specified number of times.

## Declaration

```swift
init<W, C1, C2, C3, C4, C5>(_ component: some RegexComponent, count: Int) where Output == (Substring, C1?, C2?, C3?, C4?, C5?)
```

## Parameters

- `component`: The regex component to repeat.
- `count`: The number of times to repeat component. count must be greater than or equal to zero.
