Export (0) Print
Expand All

Regex Methods

The methods of the Regex class are listed here. For a complete list of Regex class members, see the Regex Members topic.

Public Methods

public methodstatic (Shared in Visual Basic)CompileToAssembly Overloaded. Compiles regular expressions and saves them to disk in a single assembly.
public methodEquals (inherited from Object)

Supported by the .NET Compact Framework.

Overloaded. Determines whether two Object instances are equal.
public methodstatic (Shared in Visual Basic)Escape

Supported by the .NET Compact Framework.

Escapes a minimal set of metacharacters (\, *, +, ?, |, {, [, (,), ^, $, ., #, and white space) by replacing them with their escape codes.
public methodGetGroupNames

Supported by the .NET Compact Framework.

Returns an array of capturing group names for the regular expression.
public methodGetGroupNumbers

Supported by the .NET Compact Framework.

Returns an array of capturing group numbers that correspond to group names in an array.
public methodGetHashCode (inherited from Object)

Supported by the .NET Compact Framework.

Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
public methodGetType (inherited from Object)

Supported by the .NET Compact Framework.

Gets the Type of the current instance.
public methodGroupNameFromNumber

Supported by the .NET Compact Framework.

Gets the group name that corresponds to the specified group number.
public methodGroupNumberFromName

Supported by the .NET Compact Framework.

Returns the group number that corresponds to the specified group name.
public methodIsMatch

Supported by the .NET Compact Framework.

Overloaded. Indicates whether the regular expression finds a match in the input string.
public methodMatch

Supported by the .NET Compact Framework.

Overloaded. Searches an input string for an occurrence of a regular expression and returns the precise result as a single Match object.
public methodMatches

Supported by the .NET Compact Framework.

Overloaded. Searches an input string for all occurrences of a regular expression and returns all the successful matches as if Match were called numerous times.
public methodReplace

Supported by the .NET Compact Framework.

Overloaded. Replaces all occurrences of a character pattern defined by a regular expression with a specified replacement character string.
public methodSplit

Supported by the .NET Compact Framework.

Overloaded. Splits an input string into an array of substrings at the positions defined by a regular expression match.
public methodToString

Supported by the .NET Compact Framework.

Overridden. Returns the regular expression pattern that was passed into the Regex constructor.
public methodstatic (Shared in Visual Basic)Unescape

Supported by the .NET Compact Framework.

Unescapes any escaped characters in the input string.

Protected Methods

protected methodFinalize

Supported by the .NET Compact Framework.

Overridden. Forces a Regex object to free resources before the object is destroyed by the Garbage Collector.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodMemberwiseClone (inherited from Object)

Supported by the .NET Compact Framework.

Creates a shallow copy of the current Object.

See Also

Regex Class | System.Text.RegularExpressions Namespace

Show:
© 2014 Microsoft