PCRE32_COPY_NAMED_SUBSTRING(3)
okay so bestie, this page comes from the Library Functions Manual and it's all about PCRE_COPY_...D_SUBSTRING(3) π β¨
β¨ NAME β¨
PCRE β Perl-compatible regular expressions π¦
π¦ SYNOPSIS π¦
#include <pcre.h>
int pcre_copy_named_substring(const pcre *code,
const char *subject, int *ovector,
int stringcount, const char *stringname,
char *buffer, int buffersize);
int pcre16_copy_named_substring(const pcre16 *code,
PCRE_SPTR16 subject, int *ovector,
int stringcount, PCRE_SPTR16 stringname,
PCRE_UCHAR16 *buffer, int buffersize);
int pcre32_copy_named_substring(const pcre32 *code,
PCRE_SPTR32 subject, int *ovector,
int stringcount, PCRE_SPTR32 stringname,
PCRE_UCHAR32 *buffer, int buffersize);
π DESCRIPTION π
okay so this is literally a convenience function for extracting a captured substring, identified by name, into a given buffer. it's giving "i got you, bestie" energy π«Ά
the arguments are:
codeβ the pattern that was successfully matched πsubjectβ the subject that has been successfully matched πΈovectorβ the offset vector thatpcre[16|32]_exec()used πstringcountβ the value returned bypcre[16|32]_exec()β¨stringnameβ the name of the required substring π¦bufferβ the buffer to receive the string πbuffersizeβ the size ofbufferπ
the yield is the length of the substring, PCRE_ERROR_NOMEMORY if the buffer was too small, or PCRE_ERROR_NOSUBSTRING if the string name is invalid. no cap. π
there is a complete description of the PCRE native API in the pcreapi page and a description of the POSIX API in the pcreposix page. go read those if you want the full lore π
and that's the tea β this page is from PCRE 8.30, dated 24 June 2012. periodt π β¨
π¦ where this page comes from
- alpine 3.22: pcre-doc 8.45-r4 Β· BSD-3-Clause
- alpine 3.23: pcre-doc 8.45-r4 Β· BSD-3-Clause
- alpine 3.24: pcre-doc 8.45-r4 Β· BSD-3-Clause
- arch rolling: pcre 8.45-5 Β· BSD
- centos-stream 9: pcre-devel 8.44-4.el9 Β· BSD
- centos-stream 9: pcre-devel 8.44-4.el9 Β· BSD
- debian bookworm: libpcre3-dev 2:8.39-15
- fedora 43: pcre-devel 8.45-1.fc43.9 Β· BSD-3-Clause
- fedora 43: pcre-devel 8.45-1.fc43.9 Β· BSD-3-Clause
- fedora 44: pcre-devel 8.45-1.fc43.9 Β· BSD-3-Clause
- fedora 44: pcre-devel 8.45-1.fc43.9 Β· BSD-3-Clause
- nixos 26.05: pcre 8.45
- nixos 26.05: pcre-cpp 8.45
- opensuse-leap 16.0: pcre-devel 8.45-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: pcre-devel 8.45-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: pcre-devel 8.45-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: pcre-devel 8.45-160000.2.2 Β· BSD-3-Clause
- ubuntu jammy: libpcre3-dev 2:8.39-13build5
- ubuntu jammy: libpcre3-dev 2:8.39-13ubuntu0.22.04.1
- ubuntu noble: libpcre3-dev 2:8.39-15build1
- ubuntu questing: libpcre3-dev 2:8.39-15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms