1FUNCTION::NGROUPS(3stap)A collection of standard strinFUNCTION::NGROUPS(3stap)
2
3
4

NAME

6       function::ngroups - Number of subexpressions in the last match.
7

SYNOPSIS

9           ngroups:long()
10

ARGUMENTS

12       None
13

DESCRIPTION

15       returns the number of subexpressions from the last successful use of
16       the =~ regex matching operator.
17
18       Note that this number includes subexpressions which are present in the
19       regex but did not match any string; for example, given the regex
20       “a|(b)”, the subexpressions will count the group for (b) regardless of
21       whether it matched a string or not. Throws an error if the last use of
22       =~ was a failed match.
23

SEE ALSO

25       tapset::regex(3stap)
26
27
28
29SystemTap Tapset Reference       November 2021        FUNCTION::NGROUPS(3stap)
Impressum