---
title: "union(_:)"
framework: regexbuilder
role: symbol
role_heading: Instance Method
path: "regexbuilder/characterclass/union(_:)"
---

# union(_:)

Returns a character class from the union of this class and the given class.

## Declaration

```swift
func union(_ other: CharacterClass) -> CharacterClass
```
