Regex Methods

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Include Protected Members
Include Inherited Members

Include Silverlight Members
Include Silverlight for Windows Phone Members
Include XNA Framework Members

The Regex type exposes the following members.

Methods

  Name Description
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public methodStatic memberSupported by Silverlight for Windows PhoneSupported by Xbox 360 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.
Protected methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 GetGroupNames Returns an array of capturing group names for the regular expression.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 GetGroupNumbers Returns an array of capturing group numbers that correspond to group names in an array.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 GetType Gets the Type of the current instance. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 GroupNameFromNumber Gets the group name that corresponds to the specified group number.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 GroupNumberFromName Returns the group number that corresponds to the specified group name.
Protected method InitializeReferences Infrastructure. Used internally by the regular expression engine.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 IsMatch(String) Indicates whether the regular expression specified in the Regex constructor finds a match in the input string.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 IsMatch(String, Int32) Indicates whether the regular expression specified in the Regex constructor finds a match in the input string beginning at the specified starting position in the string.
Public methodStatic memberSupported by Silverlight for Windows PhoneSupported by Xbox 360 IsMatch(String, String) Indicates whether the regular expression finds a match in the input string using the regular expression specified in the pattern parameter.
Public methodStatic memberSupported by Silverlight for Windows PhoneSupported by Xbox 360 IsMatch(String, String, RegexOptions) Indicates whether the regular expression finds a match in the input string, using the regular expression specified in the pattern parameter and the matching options supplied in the options parameter.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 Match(String) Searches the specified input string for the first occurrence of the regular expression specified in the Regex constructor.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 Match(String, Int32) Searches the input string for the first occurrence of a regular expression with a specified input string starting position.
Public methodStatic memberSupported by Silverlight for Windows PhoneSupported by Xbox 360 Match(String, String) Searches the specified input string for the first occurrence of the regular expression supplied in the pattern parameter.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 Match(String, Int32, Int32) Searches the input string for the first occurrence of a regular expression with a specified input string starting position and input string length.
Public methodStatic memberSupported by Silverlight for Windows PhoneSupported by Xbox 360 Match(String, String, RegexOptions) Searches the input string for the first occurrence of the regular expression supplied in a pattern parameter with matching options supplied in an options parameter.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 Matches(String) Searches the specified input string for all occurrences of a regular expression.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 Matches(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 memberSupported by Silverlight for Windows PhoneSupported by Xbox 360 Matches(String, String) Searches the specified input string for all occurrences of the regular expression specified in the pattern parameter.
Public methodStatic memberSupported by Silverlight for Windows PhoneSupported by Xbox 360 Matches(String, String, RegexOptions) Searches the specified input string for all occurrences of the regular expression supplied in a pattern parameter with matching options supplied in an options parameter.
Protected methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 Replace(String, String) Within a specified input string, replaces all strings that match a regular expression pattern with a specified replacement string.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 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.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 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.
Public methodStatic memberSupported by Silverlight for Windows PhoneSupported by Xbox 360 Replace(String, String, String) Within a specified input string, replaces all strings that match a specified regular expression with a specified replacement string.
Public methodStatic memberSupported by Silverlight for Windows PhoneSupported by Xbox 360 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.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 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.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 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.
Public methodStatic memberSupported by Silverlight for Windows PhoneSupported by Xbox 360 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.
Public methodStatic memberSupported by Silverlight for Windows PhoneSupported by Xbox 360 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.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 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.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 Split(String) Splits the specified input string at the positions defined by a regular expression pattern specified in the Regex constructor.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 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.
Public methodStatic memberSupported by Silverlight for Windows PhoneSupported by Xbox 360 Split(String, String) Splits the input string at the positions defined by a regular expression pattern.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 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.
Public methodStatic memberSupported by Silverlight for Windows PhoneSupported by Xbox 360 Split(String, String, RegexOptions) Splits the input string at the positions defined by a specified regular expression pattern. Specified options modify the matching operation.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 ToString Returns the regular expression pattern that was passed into the Regex constructor. (Overrides Object.ToString().)
Public methodStatic memberSupported by Silverlight for Windows PhoneSupported by Xbox 360 Unescape Unescapes any escaped characters in the input string.
Protected methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 UseOptionR Infrastructure. Used internally by the regular expression engine.

Top