FUNCTION::MATCHED_STR(3stap)
β¨ FUNCTION::MATCHED_STR β¨
okay bestie, welcome to the 3stap manual β yes that's the SystemTap Tapset Reference, and yes we're about to get extremely specific about one tiny little function that's carrying the whole regexp game on its back π
πΈ NAME πΈ
function::matched_str β Return the last matched string.
like... literally. that's the whole job. and it does it flawlessly π¦
π SYNOPSIS π
matched_str:string()
that's it. that's the whole vibe. no arguments, no drama, just a string coming back at you β¨
π ARGUMENTS π
None
fr fr, nothing. she takes no arguments. she simply knows π
π DESCRIPTION π
okay so here's the tea β
matched_str returns the string matched by the last successful use of the =~ regexp matching operator. that's the whole thing. you do a =~, it works, and then this function hands you back exactly what got matched. iconic behavior, no notes π
but β and this is the important part, bestie, listen β if the last use of =~ led to a failed match, this function returns an error. like, it's not gonna be cute about it. no empty string, no polite little shrug. it's an error. so make sure your last =~ actually succeeded before you come asking for the goods π
lowkey a vibe check situation: only call matched_str when you know the match worked. iykyk π€
π SEE ALSO π
go read that one too, she's the main character of this whole regexp storyline π
SystemTap Tapset Reference Β· September 2026
mwah π that's the whole page. stay regexp-ing, bestie β and may all your matches be successful ones π§ββοΈβ¨π«Ά
π¦ where this page comes from
- centos-stream 10: systemtap-client 5.6-3.el10 Β· GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause
- centos-stream 9: systemtap-client 5.6-3.el9 Β· GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause
- fedora 43: systemtap-client 5.6-1.fc43 Β· GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause
- fedora 44: systemtap-client 5.6-1.fc44 Β· GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms