FUNCTION::MATCHED

Section: A collection of standard strin (3stap)
Updated: November 2022
Index Return to Main Contents
 

NAME

function::matched - Return a given matched subexpression.  

SYNOPSIS

    matched:string(n:long)
 

ARGUMENTS

n

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

DESCRIPTION

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 ALSO

tapset::regex(3stap)


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 15:22:17 GMT, November 16, 2022