Match Method

Regex.Match Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Searches an input string for a substring that matches a regular expression pattern and returns the first occurrence as a single Match object.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  NameDescription
Public method Match(String) Searches the specified input string for the first occurrence of the regular expression specified in the Regex constructor.
Public method Match(String, Int32) Searches the input string for the first occurrence of a regular expression with a specified input string starting position.
Public method Static member Match(String, String) Searches the specified input string for the first occurrence of the regular expression supplied in the pattern parameter.
Public method 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 method Static member 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 method Static member Match(String, String, RegexOptions, TimeSpan) Searches the input string for the first occurrence of the specified regular expression, using the specified matching options and time-out interval.
Top

Show:
© 2017 Microsoft