PCRE2_SUBSTRING_LENGTH_BYNAME(3)
π PCRE2_SUBSTRING_LENGTH_BYNAME(3) π
okay bestie, welcome to the PCRE2_SUBSTRING_LENGTH_BYNAME(3) page from the Library Functions Manual. It's all about PCRE2 β Perl-compatible regular expressions (revised API) β and this function is the one that hands you the length of a matched substring by name. π
β¨ NAME β¨
PCRE2 β Perl-compatible regular expressions (revised API)
πΈ SYNOPSIS πΈ
#include <pcre2.h>
int pcre2_substring_length_byname(pcre2_match_data *match_data,
PCRE2_SPTR name, PCRE2_SIZE *length);
π¦ DESCRIPTION π¦
This function returns the length of a matched substring, identified by name. The arguments are:
match_dataβ The match data block for the matchnameβ The substring namelengthβ Where to return the length, orNULL
bestie, listen: the third argument may be NULL if all you want to know is whether or not a substring is set. π
The yield is zero on success, or a negative error code otherwise. No cap.
There is a complete description of the PCRE2 native API in the pcre2api page and a description of the POSIX API in the pcre2posix page.
cute sign-off: this page is from PCRE2 10.47, dated 26 September 2025. π β¨
π¦ 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