Returns the number of captures.
[Visual Basic] Overridable Public ReadOnly Property Count As Integer [C#] public int Count {virtual get;} [C++] public: __property virtual int get_Count(); [JScript] public function get Count() : int;
The Count property can be one or more (group zero is always included and always counts for one). Note that as soon as the Count property is access, the Regex engine must be run to find all matches; however, if GetEnumerator is used to enumerate the matches, the Regex engine will only execute the matches that are required.
MatchCollection Class | MatchCollection Members | System.Text.RegularExpressions Namespace