Group count

From Kolmafia
Revision as of 05:14, 22 May 2010 by imported>Bale
Jump to navigation Jump to search
needs(code_samples);

Function Syntax

int group_count(matcher pattern )

  • pattern is the matcher to search

Returns the number of capturing groups in the pattern. Group zero denotes the entire pattern by convention, but it is not included in this count. Any non-negative integer smaller than or equal to the value returned by this function is guaranteed to be a valid group() parameter for this matcher.

See Also

group()