Matcher.GroupCount Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the number of capturing groups in this matcher's pattern.
[Android.Runtime.Register("groupCount", "()I", "")]
public int GroupCount ();
[<Android.Runtime.Register("groupCount", "()I", "")>]
abstract member GroupCount : unit -> int
override this.GroupCount : unit -> int
Returns
The number of capturing groups in this matcher's pattern
Implements
- Attributes
Remarks
Returns the number of capturing groups in this matcher's pattern.
Group zero denotes the entire pattern by convention. It is not included in this count.
Any non-negative integer smaller than or equal to the value returned by this method is guaranteed to be a valid group index for this matcher.
Java documentation for java.util.regex.Matcher.groupCount()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.