This documentation is archived and is not being maintained.

Regex.Matches Method (String)

.NET Framework 1.1

Searches the specified input string for all occurrences of a regular expression.

[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
The string to search for a match.

Return Value

A MatchCollection of the Match objects found by the search.

Remarks

The Matches methods are similar to the Match methods, except they return the list of successful matches that would result from iteratively calling match= Match (...), then Match.NextMatch (), and so on. The collection includes only successful matches and terminates at the first unsuccessful match.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

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

Show: