<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/RegexBuilder/ZeroOrMore",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RegexBuilder"
    ],
    "preciseIdentifier" : "s:12RegexBuilder10ZeroOrMoreV"
  },
  "title" : "ZeroOrMore"
}
-->

# ZeroOrMore

A regex component that matches zero or more occurrences of its underlying
component.

```
struct ZeroOrMore<Output>
```

## Topics

### Initializers

[`init<W, C1, C2, C3, C4>(RegexRepetitionBehavior?, () -> some RegexComponent)`](/documentation/RegexBuilder/ZeroOrMore/init(_:_:)-15cm9)

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

[`init<W, C1>(RegexRepetitionBehavior?, () -> some RegexComponent)`](/documentation/RegexBuilder/ZeroOrMore/init(_:_:)-1a2tp)

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

[`init<W, C1, C2, C3, C4, C5, C6, C7, C8, C9>(RegexRepetitionBehavior?, () -> some RegexComponent)`](/documentation/RegexBuilder/ZeroOrMore/init(_:_:)-1ac85)

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

[`init<W, C1, C2>(RegexRepetitionBehavior?, () -> some RegexComponent)`](/documentation/RegexBuilder/ZeroOrMore/init(_:_:)-1d98s)

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

[`init<W, C1, C2, C3, C4, C5, C6>(RegexRepetitionBehavior?, () -> some RegexComponent)`](/documentation/RegexBuilder/ZeroOrMore/init(_:_:)-1s6e5)

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

[`init<W, C1, C2, C3, C4>(some RegexComponent, RegexRepetitionBehavior?)`](/documentation/RegexBuilder/ZeroOrMore/init(_:_:)-254sw)

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

[`init<W, C1, C2, C3, C4, C5, C6, C7>(some RegexComponent, RegexRepetitionBehavior?)`](/documentation/RegexBuilder/ZeroOrMore/init(_:_:)-2aen2)

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

[`init<W, C1>(some RegexComponent, RegexRepetitionBehavior?)`](/documentation/RegexBuilder/ZeroOrMore/init(_:_:)-2l3tj)

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

[`init<W, C1, C2, C3, C4, C5, C6, C7, C8>(RegexRepetitionBehavior?, () -> some RegexComponent)`](/documentation/RegexBuilder/ZeroOrMore/init(_:_:)-39ch7)

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

[`init<W, C1, C2, C3, C4, C5, C6, C7, C8>(some RegexComponent, RegexRepetitionBehavior?)`](/documentation/RegexBuilder/ZeroOrMore/init(_:_:)-3npxt)

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

[`init<W, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10>(some RegexComponent, RegexRepetitionBehavior?)`](/documentation/RegexBuilder/ZeroOrMore/init(_:_:)-3wvrs)

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

[`init(RegexRepetitionBehavior?, () -> some RegexComponent)`](/documentation/RegexBuilder/ZeroOrMore/init(_:_:)-3xl6h)

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

[`init<W, C1, C2, C3, C4, C5>(RegexRepetitionBehavior?, () -> some RegexComponent)`](/documentation/RegexBuilder/ZeroOrMore/init(_:_:)-4lxf6)

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

[`init<W, C1, C2, C3>(RegexRepetitionBehavior?, () -> some RegexComponent)`](/documentation/RegexBuilder/ZeroOrMore/init(_:_:)-5xlw2)

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

[`init<W, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10>(RegexRepetitionBehavior?, () -> some RegexComponent)`](/documentation/RegexBuilder/ZeroOrMore/init(_:_:)-6hnso)

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

[`init<W, C1, C2, C3, C4, C5, C6, C7, C8, C9>(some RegexComponent, RegexRepetitionBehavior?)`](/documentation/RegexBuilder/ZeroOrMore/init(_:_:)-7oux0)

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

[`init<W, C1, C2, C3>(some RegexComponent, RegexRepetitionBehavior?)`](/documentation/RegexBuilder/ZeroOrMore/init(_:_:)-7tdrp)

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

[`init<W, C1, C2>(some RegexComponent, RegexRepetitionBehavior?)`](/documentation/RegexBuilder/ZeroOrMore/init(_:_:)-8f9h4)

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

[`init<W, C1, C2, C3, C4, C5>(some RegexComponent, RegexRepetitionBehavior?)`](/documentation/RegexBuilder/ZeroOrMore/init(_:_:)-8ovis)

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

[`init<W, C1, C2, C3, C4, C5, C6, C7>(RegexRepetitionBehavior?, () -> some RegexComponent)`](/documentation/RegexBuilder/ZeroOrMore/init(_:_:)-8tfqv)

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

[`init<W, C1, C2, C3, C4, C5, C6>(some RegexComponent, RegexRepetitionBehavior?)`](/documentation/RegexBuilder/ZeroOrMore/init(_:_:)-9tazs)

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

[`init(some RegexComponent, RegexRepetitionBehavior?)`](/documentation/RegexBuilder/ZeroOrMore/init(_:_:)-9uicg)

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

## Relationships

### Conforms To

[`RegexComponent`](/documentation/Swift/RegexComponent)

[`Copyable`](/documentation/Swift/Copyable)

[`Escapable`](/documentation/Swift/Escapable)

---

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)