Click or drag to resize
Regex Methods

The Regex type exposes the following members.

Methods
  NameDescription
Public methodEquals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodStatic memberEscape
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.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsMatch(String)
Indicates whether the regular expression specified in the System.Text.RegularExpressions.Regex constructor finds a match in a specified input string.
Public methodIsMatch(String, Int32)
Indicates whether the regular expression specified in the System.Text.RegularExpressions.Regex constructor finds a match in the specified input string, beginning at the specified starting position in the string.
Public methodStatic memberIsMatch(String, String)
Indicates whether the specified regular expression finds a match in the specified input string.
Public methodStatic memberIsMatch(String, String, RegexOptions)
Indicates whether the specified regular expression finds a match in the specified input string, using the specified matching options.
Public methodMatch(String)
Searches the specified input string for the first occurrence of the regular expression specified in the System.Text.RegularExpressions.Regex constructor.
Public methodMatch(String, Int32)
Searches the input string for the first occurrence of a regular expression, beginning at the specified starting position in the string.
Public methodStatic memberMatch(String, String)
Searches the specified input string for the first occurrence of the specified regular expression.
Public methodMatch(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.
Public methodStatic memberMatch(String, String, RegexOptions)
Searches the input string for the first occurrence of the specified regular expression, using the specified matching options.
Public methodMatches(String)
Searches the specified input string for all occurrences of a regular expression.
Public methodMatches(String, Int32)
Searches the specified input string for all occurrences of a regular expression, beginning at the specified starting position in the string.
Public methodStatic memberMatches(String, String)
Searches the specified input string for all occurrences of a specified regular expression.
Public methodStatic memberMatches(String, String, RegexOptions)
Searches the specified input string for all occurrences of a specified regular expression, using the specified matching options.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodReplace(String, String)
In a specified input string, replaces all strings that match a regular expression pattern with a specified replacement string.
Public methodStatic memberReplace(String, String, String)
In a specified input string, replaces all strings that match a specified regular expression with a specified replacement string.
Public methodStatic memberReplace(String, String, String, RegexOptions)
In a specified input string, replaces all strings that match a specified regular expression with a specified replacement string. Specified options modify the matching operation.
Public methodToString
Returns the regular expression pattern that was passed into the Regex constructor.
(Overrides ObjectToString.)
Public methodStatic memberUnescape
Converts any escaped characters in the input string.
Top
See Also