次の方法で共有


IMatchResult.GroupCount Method

Definition

Returns the number of capturing groups in this match result's pattern.

[Android.Runtime.Register("groupCount", "()I", "GetGroupCountHandler:Java.Util.Regex.IMatchResultInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int GroupCount ();
[<Android.Runtime.Register("groupCount", "()I", "GetGroupCountHandler:Java.Util.Regex.IMatchResultInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GroupCount : unit -> int

Returns

The number of capturing groups in this matcher's pattern

Attributes

Remarks

Returns the number of capturing groups in this match result'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.MatchResult.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.

Applies to