System.RegularExpressions.TRegExOption

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TRegExOption = (roNone, roIgnoreCase, roMultiLine, roExplicitCapture,
roCompiled, roSingleLine, roIgnorePatternSpace, roNotEmpty);

C++

enum DECLSPEC_DENUM TRegExOption : unsigned char { roNone, roIgnoreCase, roMultiLine, roExplicitCapture, roCompiled, roSingleLine, roIgnorePatternSpace, roNotEmpty };

Properties

Type Visibility Source Unit Parent
enum public
System.RegularExpressions.pas
System.RegularExpressions.hpp
System.RegularExpressions System.RegularExpressions

Description

Options for the rules and capabilities of the regular expression.

Enum Value Meaning

roNone

Specifies that no options are set.

roIgnoreCase

Specifies case-insensitive matching.

roMultiLine

Multiline mode. Changes the meaning of ^ and $ so they match at the beginning and end, respectively, of any line, and not just the beginning and end of the entire string.

roExplicitCapture

Specifies that the only valid captures are explicitly named or numbered groups of the form (?<name>…). This allows unnamed parentheses to act as noncapturing groups without the syntactic clumsiness of the expression (?:…).

roCompiled

Specifies that the regular expression is compiled to an assembly. This yields faster execution but increases startup time. This value should not be assigned to the Options property when calling the CompileToAssembly method.

roSingleLine

Specifies single-line mode. Changes the meaning of the dot (.) so it matches every character (instead of every character except \n).

roIgnorePatternSpace

Eliminates unescaped white space from the pattern and enables comments marked with #. However, the IgnorePatternWhitespace value does not affect or eliminate white space in character classes.

The following methods have parameters of type TRegExOptions, a set of type TRegExOption:

See Also