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.Matches (String)

Returns all the successful matches as if Match was called iteratively numerous times.

[Visual Basic]
Overloads Public Function Matches( _
   ByVal input As String _
) As MatchCollection
[C#]
public MatchCollection Matches(
   string input
);
[C++]
public: MatchCollection* Matches(
   String* input
);
[JScript]
public function Matches(
   input : String
) : MatchCollection;

Parameters

input
String containing the text to search.

Return Value

The collection of match objects found by the search.

Remarks

The Matches methods are similar to the Match methods, except that they return the list of successful matches that would result from calling match=Match(?); then match.NextMatch(); etc., iteratively. The collection includes successful matches only and terminates at the first unsuccessful match. When scan=true, this collection lists all the nonintersecting matches in the string; on the other hand, when scan=false, the collection will only scan through the portion of the string in which contiguous matches can be found.

The static Matches methods return the RegexMatchCollection corresponding to the list of matches of the specified pattern within the specified string. The methods are equivalent to the like-named instance methods and are provided for convenience.

See Also

Regex Class | Regex Members | System.Text.RegularExpressions Namespace | Regex.Matches Overload List