This documentation is archived and is not being maintained.
Regex Methods
Visual Studio 2010
The Regex type exposes the following members.
| Name | Description | |
|---|---|---|
|
CompileToAssembly(array<RegexCompilationInfo>, AssemblyName) | Compiles one or more specified Regex objects to a named assembly. |
|
CompileToAssembly(array<RegexCompilationInfo>, AssemblyName, array<CustomAttributeBuilder>) | Compiles one or more specified Regex objects to a named assembly with the specified attributes. |
|
CompileToAssembly(array<RegexCompilationInfo>, AssemblyName, array<CustomAttributeBuilder>, String) | Compiles one or more specified Regex objects and a specified resource file to a named assembly with the specified attributes. |
|
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
|
Escape | Escapes a minimal set of characters (\, *, +, ?, |, {, [, (,), ^, $,., #, and white space) by replacing them with their escape codes. This instructs the regular expression engine to interpret these characters literally rather than as metacharacters. |
|
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
|
GetGroupNames | Returns an array of capturing group names for the regular expression. |
|
GetGroupNumbers | Returns an array of capturing group numbers that correspond to group names in an array. |
|
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
|
GetType | Gets the Type of the current instance. (Inherited from Object.) |
|
GroupNameFromNumber | Gets the group name that corresponds to the specified group number. |
|
GroupNumberFromName | Returns the group number that corresponds to the specified group name. |
|
InitializeReferences | Infrastructure. Used by a Regex object generated by the CompileToAssembly method. |
|
IsMatch(String) | Indicates whether the regular expression specified in the Regex constructor finds a match in a specified input string. |
|
IsMatch(String, Int32) | Indicates whether the regular expression specified in the Regex constructor finds a match in the specified input string, beginning at the specified starting position in the string. |
|
IsMatch(String, String) | Indicates whether the specified regular expression finds a match in the specified input string. |
|
IsMatch(String, String, RegexOptions) | Indicates whether the specified regular expression finds a match in the specified input string, using the specified matching options. |
|
Match(String) | Searches the specified input string for the first occurrence of the regular expression specified in the Regex constructor. |
|
Match(String, Int32) | Searches the input string for the first occurrence of a regular expression, beginning at the specified starting position in the string. |
|
Match(String, String) | Searches the specified input string for the first occurrence of the specified regular expression. |
|
Match(String, Int32, Int32) | Searches the input string for the first occurrence of a regular expression, beginning at the specified starting position and searching only the specified number of characters. |
|
Match(String, String, RegexOptions) | Searches the input string for the first occurrence of the specified regular expression, using the specified matching options. |
|
Matches(String) | Searches the specified input string for all occurrences of a regular expression. |
|
Matches(String, Int32) | Searches the specified input string for all occurrences of a regular expression, beginning at the specified starting position in the string. |
|
Matches(String, String) | Searches the specified input string for all occurrences of a specified regular expression. |
|
Matches(String, String, RegexOptions) | Searches the specified input string for all occurrences of a specified regular expression, using the specified matching options. |
|
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
|
Replace(String, String) | Within a specified input string, replaces all strings that match a regular expression pattern with a specified replacement string. |
|
Replace(String, MatchEvaluator) | Within a specified input string, replaces all strings that match a specified regular expression with a string returned by a MatchEvaluator delegate. |
|
Replace(String, String, Int32) | Within a specified input string, replaces a specified maximum number of strings that match a regular expression pattern with a specified replacement string. |
|
Replace(String, String, String) | Within a specified input string, replaces all strings that match a specified regular expression with a specified replacement string. |
|
Replace(String, String, MatchEvaluator) | Within a specified input string, replaces all strings that match a specified regular expression with a string returned by a MatchEvaluator delegate. |
|
Replace(String, MatchEvaluator, Int32) | Within a specified input string, replaces a specified maximum number of strings that match a regular expression pattern with a string returned by a MatchEvaluator delegate. |
|
Replace(String, String, Int32, Int32) | Within a specified input substring, replaces a specified maximum number of strings that match a regular expression pattern with a specified replacement string. |
|
Replace(String, String, String, RegexOptions) | Within a specified input string, replaces all strings that match a specified regular expression with a specified replacement string. Specified options modify the matching operation. |
|
Replace(String, String, MatchEvaluator, RegexOptions) | Within a specified input string, replaces all strings that match a specified regular expression with a string returned by a MatchEvaluator delegate. Specified options modify the matching operation. |
|
Replace(String, MatchEvaluator, Int32, Int32) | Within a specified input substring, replaces a specified maximum number of strings that match a regular expression pattern with a string returned by a MatchEvaluator delegate. |
|
Split(String) | Splits the specified input string at the positions defined by a regular expression pattern specified in the Regex constructor. |
|
Split(String, Int32) | Splits the specified input string a specified maximum number of times at the positions defined by a regular expression specified in the Regex constructor. |
|
Split(String, String) | Splits the input string at the positions defined by a regular expression pattern. |
|
Split(String, Int32, Int32) | Splits the specified input string a specified maximum number of times at the positions defined by a regular expression specified in the Regex constructor. The search for the regular expression pattern starts at a specified character position in the input string. |
|
Split(String, String, RegexOptions) | Splits the input string at the positions defined by a specified regular expression pattern. Specified options modify the matching operation. |
|
ToString | Returns the regular expression pattern that was passed into the Regex constructor. (Overrides Object::ToString().) |
|
Unescape | Converts any escaped characters in the input string. |
|
UseOptionC | Infrastructure. Used by a Regex object generated by the CompileToAssembly method. |
|
UseOptionR | Infrastructure. Used by a Regex object generated by the CompileToAssembly method. |
| Name | Description | |
|---|---|---|
|
ISerializable::GetObjectData | Infrastructure. Populates a SerializationInfo object with the data necessary to deserialize the current Regex object. |
Show: