System.Text.RegularExpressions.Match.NextMatch Method

Returns a new System.Text.RegularExpressions.Match object with the results for the next match, starting at the position at which the last match ended (at the character after the last matched character).

Syntax

public Match NextMatch ()

Returns

The next regular expression match.

Remarks

This method is similar to calling Regex.Match(string, int) again and passing (Index+Length) as the new starting position.

Note:

This method does not modify the current instance. Instead, it returns a new System.Text.RegularExpressions.Match object that contains information about the next match.

Attempting to retrieve the next match may throw a System.Text.RegularExpressions.RegexMatchTimeoutException if a time-out value for matching operations is in effect and the attempt to find the next match exceeds that time-out interval.

Requirements

Namespace: System.Text.RegularExpressions
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0