---
name: "function::matched_str"
section: "3stap"
platform: "linux"
package: "systemtap-doc"
version: "5.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/function::matched_str"
---

# function::matched\_str(3stap)

Return the last matched string.

## NAME

function::matched\_str - Return the last matched string.

## SYNOPSIS

```
    matched_str:string()
```

## ARGUMENTS

None

## DESCRIPTION

returns the string matched by the last successful use of the =~ regexp matching operator. Returns an error if the last use of =~ led to a failed match.

## SEE ALSO0

[*tapset::regex*(3stap)](/tapset::regex/3stap.md)
