Enumeration

NSRegularExpressionOptions

These constants define the regular expression options. These constants are used by the property options, regularExpressionWithPattern:options:error:, and initWithPattern:options:error:.

Declaration

typedef enum NSRegularExpressionOptions : NSUInteger {
    ...
} NSRegularExpressionOptions;

Topics

Constants

NSRegularExpressionCaseInsensitive

Match letters in the pattern independent of case.

NSRegularExpressionAllowCommentsAndWhitespace

Ignore whitespace and #-prefixed comments in the pattern.

NSRegularExpressionIgnoreMetacharacters

Treat the entire pattern as a literal string.

NSRegularExpressionDotMatchesLineSeparators

Allow . to match any character, including line separators.

NSRegularExpressionAnchorsMatchLines

Allow ^ and $ to match the start and end of lines.

NSRegularExpressionUseUnixLineSeparators

Treat only \n as a line separator (otherwise, all standard line separators are used).

NSRegularExpressionUseUnicodeWordBoundaries

Use Unicode TR#29 to specify word boundaries (otherwise, traditional regular expression word boundaries are used).

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software