PCRE2_GET_MARK(3)
π PCRE2_GET_MARK(3) π
okay bestie, welcome to the Library Functions Manual page for the PCRE2 function pcre2_get_mark. it's giving "tiny function, important lore" energy, and we're gonna get through it together π«Ά
π NAME π
PCRE2 - Perl-compatible regular expressions (revised API)
β¨ SYNOPSIS β¨
#include <pcre2.h>
PCRE2_SPTR pcre2_get_mark(pcre2_match_data *match_data);
π DESCRIPTION π
so picture this: you already called pcre2_match() and passed it the match block that is this function's argument. after that, pcre2_get_mark() returns a pointer to the last (*MARK), (*PRUNE), or (*THEN) name that was encountered during the matching process. yup, the last one, bestie. no cap.
the name is zero-terminated, and it lives inside the compiled pattern. the length of the name is in the preceding code unit β that's the little detail, don't forget it π
. if no name is available, NULL is returned.
after a successful match, the name that is returned is the last one on the matching path. after a failed match or a partial match, the last encountered name is returned. lowkey important distinction, okay?
there's a complete description of the PCRE2 native API in the pcre2api page, and a description of the POSIX API in the pcre2posix page. go read those if you want the full extended universe π.
and that's the whole page, bestie π it's PCRE2 10.47, dated 13 January 2018, and the page is literally PCRE2_GET_MARK(3). slay β¨
π¦ where this page comes from
- fedora 43: pcre2-devel 10.47-1.fc43 Β· BSD-3-Clause AND FSFULLR AND X11 AND GPL-2.0-or-later AND FSFAP AND FSFUL AND GPL-3.0-or-later
- fedora 43: pcre2-devel 10.47-1.fc43 Β· BSD-3-Clause AND FSFULLR AND X11 AND GPL-2.0-or-later AND FSFAP AND FSFUL AND GPL-3.0-or-later
- fedora 44: pcre2-devel 10.47-1.fc44.1 Β· BSD-3-Clause AND FSFULLR AND X11 AND GPL-2.0-or-later AND FSFAP AND FSFUL AND GPL-3.0-or-later
- fedora 44: pcre2-devel 10.47-1.fc44.1 Β· BSD-3-Clause AND FSFULLR AND X11 AND GPL-2.0-or-later AND FSFAP AND FSFUL AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms