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.

Namespace: System.Text.RegularExpressions
Assembly: (in )

Syntax

[FlagsAttribute]
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 are ignored. Ordinarily, the regular expression engine performs string comparisons based on the conventions of the current culture. If the CultureInvariant option is specified, it uses the conventions of the invariant culture.
ECMAScript Enables ECMAScript-compliant behavior for the expression. This value can be used only in conjunction with the IgnoreCase and Multiline 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 #. However, the IgnorePatternWhitespace value does not affect or eliminate white space in character classes
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

Version Information

Available in the .NET Micro Framework version 4.2.

See Also

Reference

System.Text.RegularExpressions Namespace