section

inline fun section(builder: RegexBuilder.() -> Unit): RegexBuilder(source)

This just provides an indent around related parts of the pattern. Defines a section of the regular expression string. The builder function is applied to the RegexBuilderScope to define the section content.

Return

The current RegexBuilderScope instance, enabling function chaining.

Parameters

builder

A lambda function with RegexBuilderScope as its receiver, used to define the section content.