Difference between revisions of "Group count"
Jump to navigation
Jump to search
imported>Bale m |
imported>Ulti (improving regex-related navigation) |
||
Line 19: | Line 19: | ||
needscode=yes| | needscode=yes| | ||
− | see_also={{SeeAlso|group}}| | + | see_also={{SeeAlso|create_matcher|group|find|group_string}}| |
}} | }} | ||
[[Category:String Handling Routines]] | [[Category:String Handling Routines]] |
Latest revision as of 17:07, 14 October 2014
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.