NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Regex.Match

The caller can optionally specify a starting position (via startpos). If not specified, the default startpos is at the beginning or end of the interval (the beginning if the Match is left-to-right, and the end if right-to-left).

Note that a match can be restricted so that it does not scan by anchoring the regular expression with a "\G" (at the left for a left-to-right pattern, or at the right for a right-to-left pattern). This restricts the match so that it must start exactly at startpos.

When a Match is left-to-right (the default), the match and the scan proceed rightward, starting at the character at startpos. When a Match is right-to-left (constructed with the "r" option), the match and scan are in the opposite direction and begin with the character at startpos-1.

Overload List

Matches a regular expression with a string and returns the precise result as a RegexMatch object.

[Visual Basic] Overloads Public Function Match(String, Integer) As Match
[C#] public Match Match(String, int);
[C++] public: Match* Match(String*, int);
[JScript] public function Match(String, int) : Match;

Matches a regular expression with a string and returns the precise result as a RegexMatch object.

[Visual Basic] Overloads Public Function Match(String, Integer, Integer) As Match
[C#] public Match Match(String, int, int);
[C++] public: Match* Match(String*, int, int);
[JScript] public function Match(String, int, int) : Match;
[Visual Basic] Overloads Public Shared Function Match(String, String) As Match
[C#] public static Match Match(String, String);
[C++] public: static Match* Match(String*, String*);
[JScript] public static function Match(String, String) : Match;
[Visual Basic] Overloads Public Shared Function Match(String, String, String) As Match
[C#] public static Match Match(String, String, String);
[C++] public: static Match* Match(String*, String*, String*);
[JScript] public static function Match(String, String, String) : Match;

Matches a regular expression with a string and returns the precise result as a RegexMatch object.

[Visual Basic] Overloads Public Function Match(String) As Match
[C#] public Match Match(String);
[C++] public: Match* Match(String*);
[JScript] public function Match(String) : Match;

See Also

Regex Class | Regex Members | System.Text.RegularExpressions Namespace