Sponsor:

Your company here, and a link to your site. Click to find out more.

function::ngroups.3stap - Man Page

Number of subexpressions in the last match.

Synopsis

    ngroups:long()

Arguments

None

Description

returns the number of subexpressions from the last successful use of the =~ regex matching operator.

Note that this number includes subexpressions which are present in the regex but did not match any string; for example, given the regex ā€œa|(b)ā€, the subexpressions will count the group for (b) regardless of whether it matched a string or not. Throws an error if the last use of =~ was a failed match.

See Also0

tapset::regex(3stap)

Info

November 2023 SystemTap Tapset Reference A collection of standard strin