Export (0) Print
Expand All

RegexOptions Enumeration

Provides enumerated values to use to set regular expression options.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

[Visual Basic]
<Flags>
<Serializable>
Public Enum RegexOptions
[C#]
[Flags]
[Serializable]
public enum RegexOptions
[C++]
[Flags]
[Serializable]
__value public enum RegexOptions
[JScript]
public
   Flags
 Serializable
enum RegexOptions

Members

Member name Description Value
Compiled

Supported by the .NET Compact Framework.

Specifies that the regular expression is compiled to an assembly. This yields faster execution but increases startup time. 8
CultureInvariant

Supported by the .NET Compact Framework.

Specifies that cultural differences in language is ignored. See Performing Culture-Insensitive Operations in the RegularExpressions Namespace for more information. 512
ECMAScript

Supported by the .NET Compact Framework.

Enables ECMAScript-compliant behavior for the expression. This flag can be used only in conjunction with the IgnoreCase, Multiline, and Compiled flags. The use of this flag with any other flags results in an exception. 256
ExplicitCapture

Supported by the .NET Compact Framework.

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 (?:). 4
IgnoreCase

Supported by the .NET Compact Framework.

Specifies case-insensitive matching. 1
IgnorePatternWhitespace

Supported by the .NET Compact Framework.

Eliminates unescaped white space from the pattern and enables comments marked with #. 32
Multiline

Supported by the .NET Compact Framework.

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. 2
None

Supported by the .NET Compact Framework.

Specifies that no options are set. 0
RightToLeft

Supported by the .NET Compact Framework.

Specifies that the search will be from right to left instead of from left to right. 64
Singleline

Supported by the .NET Compact Framework.

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

Requirements

Namespace: System.Text.RegularExpressions

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

Assembly: System (in System.dll)

See Also

System.Text.RegularExpressions Namespace

Show:
© 2014 Microsoft