RegexComponentBuilder

A custom parameter attribute that constructs regular expressions from closures.

iOS
16.0+
macOS
13.0+
tvOS
16.0+
watchOS
9.0+

You’re reading documentation from an older version of Swift 6.1.

A symbol with the same signature as this one exists in the latest stable release of Swift 6.1.

@resultBuilder enum RegexComponentBuilder

You typically see RegexComponentBuilder as a parameter attribute for Regex- or RegexComponent-producing closure parameters, allowing those closures to combine multiple regular expression components. Type initializers and string algorithm methods in the RegexBuilder framework include a builder closure parameter, so that you can use regular expression components together.