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!

Group.Captures

Returns a collection of all the captures matched by the capturing group, in innermost-leftmost-first order (or innermost-rightmost-first order if compiled with the "r" option). The collection may have zero or more items.

[Visual Basic]
Public ReadOnly Property Captures As CaptureCollection
[C#]
public CaptureCollection Captures {get;}
[C++]
public: __property CaptureCollection* get_Captures();
[JScript]
public function get Captures() : CaptureCollection;

Property Value

A collection of matching captures.

Remarks

The collection is empty for an unsuccessful match and has one entry (corresponding to the entire matched string) for a successful match; it is equivalent to Group(0) captures. Group also inherits from Capture so that the last substring captured can be accessed directly. (That is, the Group instance itself is equivalent to Captures.Item[Captures.Size- 1].)

See Also

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