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;
A collection of matching captures.
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].)
Group Class | Group Members | System.Text.RegularExpressions Namespace