Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
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.
Namespace: System.Text.RegularExpressions
Assembly: System.Text.RegularExpressions (in System.Text.RegularExpressions.dll)
Syntax
'Declaration
<FlagsAttribute> _
Public Enumeration RegexOptions
[FlagsAttribute]
public enum RegexOptions
[FlagsAttribute]
public enum class RegexOptions
[<FlagsAttribute>]
type RegexOptions
public enum RegexOptions
Members
Member name | Description | |
---|---|---|
Compiled | 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. | |
CultureInvariant | Specifies that cultural differences in language is ignored. | |
ECMAScript | Enables ECMAScript-compliant behavior for the expression. This value can be used only in conjunction with the IgnoreCase, Multiline, and Compiled values. The use of this value with any other values results in an exception. | |
ExplicitCapture | 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 (?:…). | |
IgnoreCase | Specifies case-insensitive matching. | |
IgnorePatternWhitespace | Eliminates unescaped white space from the pattern and enables comments marked with #. | |
Multiline | 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. | |
None | Specifies that no options are set. | |
Singleline | Specifies single-line mode. Changes the meaning of the dot (.) so it matches every character (instead of every character except \n). | |
Timed | Timed |