<!--
{
  "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/AlternationBuilder",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RegexBuilder"
    ],
    "preciseIdentifier" : "s:12RegexBuilder011AlternationB0V"
  },
  "title" : "AlternationBuilder"
}
-->

# AlternationBuilder

A custom parameter attribute that constructs regular expression alternations
from closures.

```
@resultBuilder struct AlternationBuilder
```

## Overview

When you use a `ChoiceOf` initializer, the initializer’s
closure parameter has an `AlternationBuilder` attribute, allowing you
to provide multiple regular expression statements as alternatives.

## Topics

### Type Methods

[`static func buildExpression<R>(R) -> R`](/documentation/RegexBuilder/AlternationBuilder/buildExpression(_:))

[`static func buildPartialBlock<W0, C1, C2, C3, C4, W1, C5, C6>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5?, C6?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-1jq94)

[`static func buildPartialBlock<W0, C1, W1, C2>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-1oadq)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, C5, W1, C6, C7>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6?, C7?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-1vk92)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, C7, C8>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7, C8)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-20ao)

[`static func buildPartialBlock<W0, C1, C2, C3>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-28nze)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, C7, C8, C9, W1, C10>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-2afed)

[`static func buildPartialBlock<W1, C1, C2, C3, C4, C5>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1?, C2?, C3?, C4?, C5?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-2q3in)

[`static func buildPartialBlock<W0, C1, W1, C2, C3, C4, C5, C6>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2?, C3?, C4?, C5?, C6?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-2yatq)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, W1, C5, C6, C7>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5?, C6?, C7?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-30m9e)

[`static func buildPartialBlock<W1, C1, C2, C3, C4>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1?, C2?, C3?, C4?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-3571v)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, C7>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-38zc3)

[`static func buildPartialBlock<W1, C1, C2, C3, C4, C5, C6, C7, C8>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1?, C2?, C3?, C4?, C5?, C6?, C7?, C8?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-39yml)

[`static func buildPartialBlock<W0, C1, C2, W1, C3, C4, C5, C6, C7, C8, C9, C10>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3?, C4?, C5?, C6?, C7?, C8?, C9?, C10?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-3a1qj)

[`static func buildPartialBlock<W0, C1, W1, C2, C3, C4>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2?, C3?, C4?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-3ascd)

[`static func buildPartialBlock<W0, C1, C2, W1, C3, C4, C5, C6>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3?, C4?, C5?, C6?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-3b47j)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, W1, C5>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-3eldc)

[`static func buildPartialBlock<W0, C1, C2, C3, W1, C4, C5>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4?, C5?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-3ibe4)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, C7, W1, C8, C9>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7, C8?, C9?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-3nzbh)

[`static func buildPartialBlock<W0, C1, C2, C3, W1, C4, C5, C6, C7>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4?, C5?, C6?, C7?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-3rkqj)

[`static func buildPartialBlock<W0, C1, C2, W1, C3, C4, C5, C6, C7>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3?, C4?, C5?, C6?, C7?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-3wkc9)

[`static func buildPartialBlock<W0, C1>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-42jgz)

[`static func buildPartialBlock(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<Substring>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-46i6m)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, W1, C5, C6, C7, C8, C9, C10>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5?, C6?, C7?, C8?, C9?, C10?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-4jwp3)

[`static func buildPartialBlock<W0, C1, C2, W1, C3, C4, C5, C6, C7, C8, C9>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3?, C4?, C5?, C6?, C7?, C8?, C9?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-4nz0t)

[`static func buildPartialBlock<W0, C1, W1, C2, C3, C4, C5, C6, C7, C8, C9, C10>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2?, C3?, C4?, C5?, C6?, C7?, C8?, C9?, C10?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-4q1xd)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-53xav)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, C5, W1, C6, C7, C8, C9, C10>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6?, C7?, C8?, C9?, C10?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-576fa)

[`static func buildPartialBlock<W0, C1, C2, W1, C3, C4>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3?, C4?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-57987)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, W1, C7, C8>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7?, C8?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-5afat)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, C7, W1, C8, C9, C10>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7, C8?, C9?, C10?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-5fcrr)

[`static func buildPartialBlock<W1, C1, C2, C3>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1?, C2?, C3?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-5me97)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, C5, W1, C6, C7, C8>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6?, C7?, C8?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-5qva)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, C5>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-5wwt0)

[`static func buildPartialBlock<W0, C1, C2, C3, W1, C4>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-6074o)

[`static func buildPartialBlock<W0, C1, C2, C3, W1, C4, C5, C6, C7, C8, C9>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4?, C5?, C6?, C7?, C8?, C9?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-653ta)

[`static func buildPartialBlock<W0, C1, C2, C3, W1, C4, C5, C6, C7, C8>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4?, C5?, C6?, C7?, C8?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-6842g)

[`static func buildPartialBlock<W0, C1, W1, C2, C3>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2?, C3?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-6anqe)

[`static func buildPartialBlock<W1, C1>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-6hkv5)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, C7, C8, C9>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7, C8, C9)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-6nfpu)

[`static func buildPartialBlock<W0, C1, C2, W1, C3, C4, C5, C6, C7, C8>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3?, C4?, C5?, C6?, C7?, C8?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-6pfu4)

[`static func buildPartialBlock<W1, C1, C2>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1?, C2?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-6tz5g)

[`static func buildPartialBlock<W1, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1?, C2?, C3?, C4?, C5?, C6?, C7?, C8?, C9?, C10?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-6vjm9)

[`static func buildPartialBlock<W0, C1, C2, W1, C3>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-6vp0)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, W1, C5, C6, C7, C8, C9>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5?, C6?, C7?, C8?, C9?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-6x6gg)

[`static func buildPartialBlock<W1, C1, C2, C3, C4, C5, C6>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1?, C2?, C3?, C4?, C5?, C6?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-6yu9n)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, C7, C8, W1, C9>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7, C8, C9?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-70usl)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, C5, W1, C6, C7, C8, C9>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6?, C7?, C8?, C9?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-71zj2)

[`static func buildPartialBlock<W0, C1, W1, C2, C3, C4, C5, C6, C7, C8>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2?, C3?, C4?, C5?, C6?, C7?, C8?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-7ihw4)

[`static func buildPartialBlock<W0, C1, C2, C3, W1, C4, C5, C6, C7, C8, C9, C10>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4?, C5?, C6?, C7?, C8?, C9?, C10?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-7jsg7)

[`static func buildPartialBlock<W0, C1, C2>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-815py)

[`static func buildPartialBlock<W0, C1, C2, C3, W1, C4, C5, C6>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4?, C5?, C6?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-8a7vx)

[`static func buildPartialBlock<W0, C1, W1, C2, C3, C4, C5, C6, C7>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2?, C3?, C4?, C5?, C6?, C7?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-8dd0v)

[`static func buildPartialBlock<W0, C1, W1, C2, C3, C4, C5>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2?, C3?, C4?, C5?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-8e0ap)

[`static func buildPartialBlock<W0, C1, C2, C3, C4>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-8pz3c)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, C5, W1, C6>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-90yht)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, W1, C7>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-9f39x)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, W1, C7, C8, C9>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7?, C8?, C9?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-9g62e)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, W1, C5, C6, C7, C8>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5?, C6?, C7?, C8?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-9k7s0)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, C7, W1, C8>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7, C8?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-9op0h)

[`static func buildPartialBlock<W0, C1, C2, W1, C3, C4, C5>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3?, C4?, C5?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-9s1co)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, W1, C7, C8, C9, C10>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7?, C8?, C9?, C10?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-b6ks)

[`static func buildPartialBlock<W1, C1, C2, C3, C4, C5, C6, C7>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1?, C2?, C3?, C4?, C5?, C6?, C7?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-klfl)

[`static func buildPartialBlock<W0, C1, C2, C3, C4, C5, C6, C7, C8, W1, C9, C10>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2, C3, C4, C5, C6, C7, C8, C9?, C10?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-o7ny)

[`static func buildPartialBlock<W1, C1, C2, C3, C4, C5, C6, C7, C8, C9>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1?, C2?, C3?, C4?, C5?, C6?, C7?, C8?, C9?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-q4oo)

[`static func buildPartialBlock<W0, C1, W1, C2, C3, C4, C5, C6, C7, C8, C9>(accumulated: some RegexComponent, next: some RegexComponent) -> ChoiceOf<(Substring, C1, C2?, C3?, C4?, C5?, C6?, C7?, C8?, C9?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(accumulated:next:)-toh7)

[`static func buildPartialBlock<R, W, C1, C2>(first: R) -> ChoiceOf<(W, C1?, C2?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(first:)-1kh7h)

[`static func buildPartialBlock<R, W, C1, C2, C3, C4, C5, C6>(first: R) -> ChoiceOf<(W, C1?, C2?, C3?, C4?, C5?, C6?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(first:)-271vl)

[`static func buildPartialBlock<R, W, C1, C2, C3, C4, C5>(first: R) -> ChoiceOf<(W, C1?, C2?, C3?, C4?, C5?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(first:)-3f6z3)

[`static func buildPartialBlock<R, W, C1>(first: R) -> ChoiceOf<(W, C1?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(first:)-520tx)

[`static func buildPartialBlock<R, W, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10>(first: R) -> ChoiceOf<(W, C1?, C2?, C3?, C4?, C5?, C6?, C7?, C8?, C9?, C10?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(first:)-5qbok)

[`static func buildPartialBlock<R, W, C1, C2, C3, C4, C5, C6, C7>(first: R) -> ChoiceOf<(W, C1?, C2?, C3?, C4?, C5?, C6?, C7?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(first:)-63ah5)

[`static func buildPartialBlock<R, W, C1, C2, C3, C4>(first: R) -> ChoiceOf<(W, C1?, C2?, C3?, C4?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(first:)-6mjz0)

[`static func buildPartialBlock<R, W, C1, C2, C3, C4, C5, C6, C7, C8, C9>(first: R) -> ChoiceOf<(W, C1?, C2?, C3?, C4?, C5?, C6?, C7?, C8?, C9?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(first:)-6vt65)

[`static func buildPartialBlock<R>(first: R) -> ChoiceOf<R.RegexOutput>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(first:)-7jdle)

[`static func buildPartialBlock<R, W, C1, C2, C3>(first: R) -> ChoiceOf<(W, C1?, C2?, C3?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(first:)-c2a6)

[`static func buildPartialBlock<R, W, C1, C2, C3, C4, C5, C6, C7, C8>(first: R) -> ChoiceOf<(W, C1?, C2?, C3?, C4?, C5?, C6?, C7?, C8?)>`](/documentation/RegexBuilder/AlternationBuilder/buildPartialBlock(first:)-uy7q)

---

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)