Contents

init(pattern:options:)

Returns an initialized NSRegularExpression instance with the specified regular expression pattern and options.

Declaration

init(pattern: String, options: NSRegularExpression.Options = []) throws

Parameters

  • pattern:

    The regular expression pattern to compile.

  • options:

    The regular expression options that are applied to the expression during matching. See Options Swift.struct for possible values.

Return Value

An instance of NSRegularExpression for the specified regular expression and options.

Discussion