mscorlib(4.0.0.0) API with additions
System.Text.RegularExpressions Namespace Reference

Classes

class  Capture
 Represents the results from a single successful subexpression capture. More...
 
class  CaptureCollection
 Represents the set of captures made by a single capturing group. More...
 
class  Group
 Represents the results from a single capturing group. More...
 
class  GroupCollection
 Returns the set of captured groups in a single match. More...
 
class  Match
 Represents the results from a single regular expression match. More...
 
class  MatchCollection
 Represents the set of successful matches found by iteratively applying a regular expression pattern to the input string. More...
 
class  Regex
 Represents an immutable regular expression.To browse the .NET Framework source code for this type, see the Reference Source. More...
 
class  RegexCompilationInfo
 Provides information about a regular expression that is used to compile a regular expression to a stand-alone assembly. More...
 
class  RegexMatchTimeoutException
 The exception that is thrown when the execution time of a regular expression pattern-matching method exceeds its time-out interval. More...
 
class  RegexRunner
 The T:System.Text.RegularExpressions.RegexRunner class is the base class for compiled regular expressions. More...
 
class  RegexRunnerFactory
 Creates a T:System.Text.RegularExpressions.RegexRunner class for a compiled regular expression. More...
 

Enumerations

enum  RegexOptions {
  RegexOptions.None = 0x0, RegexOptions.IgnoreCase = 0x1, RegexOptions.Multiline = 0x2, RegexOptions.ExplicitCapture = 0x4,
  RegexOptions.Compiled = 0x8, RegexOptions.Singleline = 0x10, RegexOptions.IgnorePatternWhitespace = 0x20, RegexOptions.RightToLeft = 0x40,
  RegexOptions.ECMAScript = 0x100, RegexOptions.CultureInvariant = 0x200
}
 Provides enumerated values to use to set regular expression options. More...
 

Functions

internal delegate RegexRunner CreateInstanceDelegate ()
 
internal delegate bool FindFirstCharDelegate (RegexRunner r)
 
delegate string MatchEvaluator (Match match)
 Represents the method that is called each time a regular expression match is found during a Overload:System.Text.RegularExpressions.Regex.Replace method operation. More...
 
internal delegate void NoParamDelegate (RegexRunner r)
 

Enumeration Type Documentation

◆ RegexOptions

Provides enumerated values to use to set regular expression options.

Enumerator
None 

Specifies that no options are set. For more information about the default behavior of the regular expression engine, see the "Default Options" section in the Regular Expression Options topic.

IgnoreCase 

Specifies case-insensitive matching. For more information, see the "Case-Insensitive Matching " section in the Regular Expression Options topic.

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. For more information, see the "Multiline Mode" section in the Regular Expression Options topic.

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 (?:…). For more information, see the "Explicit Captures Only" section in the Regular Expression Options topic.

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 P:System.Text.RegularExpressions.RegexCompilationInfo.Options property when calling the M:System.Text.RegularExpressions.Regex.CompileToAssembly(System.Text.RegularExpressions.RegexCompilationInfo[],System.Reflection.AssemblyName) method. For more information, see the "Compiled Regular Expressions" section in the Regular Expression Options topic.

Singleline 

Specifies single-line mode. Changes the meaning of the dot (.) so it matches every character (instead of every character except
). For more information, see the "Single-line Mode" section in the Regular Expression Options topic.

IgnorePatternWhitespace 

Eliminates unescaped white space from the pattern and enables comments marked with #. However, this value does not affect or eliminate white space in , numeric , or tokens that mark the beginning of individual . For more information, see the "Ignore White Space" section of the Regular Expression Options topic.

RightToLeft 

Specifies that the search will be from right to left instead of from left to right. For more information, see the "Right-to-Left Mode" section in the Regular Expression Options topic.

ECMAScript 

Enables ECMAScript-compliant behavior for the expression. This value can be used only in conjunction with the F:System.Text.RegularExpressions.RegexOptions.IgnoreCase, F:System.Text.RegularExpressions.RegexOptions.Multiline, and F:System.Text.RegularExpressions.RegexOptions.Compiled values. The use of this value with any other values results in an exception.For more information on the F:System.Text.RegularExpressions.RegexOptions.ECMAScript option, see the "ECMAScript Matching Behavior" section in the Regular Expression Options topic.

CultureInvariant 

Specifies that cultural differences in language is ignored. For more information, see the "Comparison Using the Invariant Culture" section in the Regular Expression Options topic.

Definition at line 6 of file RegexOptions.cs.

Function Documentation

◆ MatchEvaluator()

delegate string System.Text.RegularExpressions.MatchEvaluator ( Match  match)

Represents the method that is called each time a regular expression match is found during a Overload:System.Text.RegularExpressions.Regex.Replace method operation.

Parameters
matchThe T:System.Text.RegularExpressions.Match object that represents a single regular expression match during a Overload:System.Text.RegularExpressions.Regex.Replace method operation.
Returns
A string returned by the method that is represented by the T:System.Text.RegularExpressions.MatchEvaluator delegate.