---
title: "init(_:_:)"
framework: regexbuilder
role: symbol
role_heading: Initializer
path: "regexbuilder/oneormore/init(_:_:)-7o7ll"
---

# init(_:_:)

Creates a regex component that matches the given component one or more times.

## Declaration

```swift
init(_ behavior: RegexRepetitionBehavior? = nil, @RegexComponentBuilder _ componentBuilder: () -> some RegexComponent) where Output == Substring
```

## Parameters

- `behavior`: The repetition behavior to use when repeating component in the match. If behavior is nil, the default repetition behavior is used, which can be changed from eager by calling repetitionBehavior(_:) on the resulting Regex.
- `componentBuilder`: A builder closure that generates a regex component.
