PCRE2_SET_GLOB_SEPARATOR(3)
π PCRE2_SET_GLOB_SEPARATOR(3) π
okay so this is a page from the PCRE2 manual β yep, that's Perl-compatible regular expressions (revised API), the library functions manual bestie, we're in the grown-up section today π
β¨ NAME β¨
PCRE2 β Perl-compatible regular expressions (revised API). that's the whole name section, she's short and iconic, no notes π
πΈ SYNOPSIS πΈ
#include <pcre2.h>
int pcre2_set_glob_separator(pcre2_convert_context *cvcontext,
uint32_t separator_char);
like, that's the whole vibe. two arguments, one int coming back at you π«Ά
π¦ DESCRIPTION π¦
okay so bestie, listen β pcre2_set_glob_separator() is part of an experimental set of pattern conversion functions. yes, experimental, as in, she's still in her testing era, so don't come for her if things get weird π
what she does: she sets the component separator character that gets used when converting globs. that's it, that's her whole job, and she does it slayfully β¨
the second argument β that's separator_char β has to be one of these three characters:
- forward slash β
/ - backslash β
\ - dot β
.
that's the whole guest list. nobody else gets in π
the default is lowkey platform-dependent, so keep up:
- backslash when you're running under Windows πͺ
- otherwise, forward slash π§π
and the result? the function gives you back zero for success β iconic, flawless, no cap β or PCRE2_ERROR_BADDATA if that second argument is invalid. so if you handed her something cursed, she's gonna tell you π©
fr fr, if PCRE2_ERROR_BADDATA shows up, it's not her, it's your separator. check your characters before you blame the function π
the pattern conversion functions are described in the pcre2convert documentation β go read that one too, it's giving required reading π
π§ sign-off π§
and that's the page!! this one's from PCRE2 10.47, dated 17 June 2018, and it lives at the bottom as PCRE2_SET_GLOB_SEPARATOR(3) β go forth and separate your globs correctly, bestie, ily, bye πππ
π¦ 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