function::matched(3stap)

function::matched3stap

Return a given matched subexpression.

Usage

    matched:string(n:long)

Arguments

n

index to the subexpression to return. 0 corresponds to the entire regular expression.

Overview

returns the content of the n'th subexpression of the last successful use of the =~ regex matching operator. Returns an empty string if the n'th subexpression was not matched (e.g. due to alternation). Throws an error if the last use of =~ was a failed match, or if fewer than n subexpressions are present in the original regexp.

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.