function::ngroups(3stap)

function::ngroups3stap

Number of subexpressions in the last match.

Usage

    ngroups:long()

Arguments

None

Overview

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)

Releases

4 releases since Debian 10 (Buster); the text changed 3 times.

  1. 10
  2. 11
  3. 12
  4. 13

From systemtap-doc 5.1-5 in Debian 13 (Trixie). Parsed by carta from the page's man source.