PCRE2_SET_COMPILE_EXTRA_OPTIONS(3)
π PCRE2_SET_COMPILE_EXTRA_OPTIONS π
okay bestie, so this is a page from the Library Functions Manual β yes, the Library Functions Manual, we're in the big leagues now β and it's all about PCRE2, aka Perl-compatible regular expressions (revised API). Regex girlies rise up π¦
β¨ NAME β¨
PCRE2 β Perl-compatible regular expressions (revised API). that's it, that's the name, no cap π
πΈ SYNOPSIS πΈ
#include <pcre2.h>
int pcre2_set_compile_extra_options(pcre2_compile_context *ccontext,
uint32_t extra_options);
π DESCRIPTION π
so what does this function actually do? it sets additional option bits for pcre2_compile() β the bits live in a compile context β and here's the thing that matters, the main-character detail: it completely replaces all the bits. not merges, not nudges, not "adds a lil something". replaces. all of them. so if you were expecting your old flags to survive, nope, they are gone π
now the extra options themselves, and there are a lot of them β slay π₯
PCRE2_EXTRA_ALLOW_LOOKAROUND_BSKβ Allow\Kin lookaroundsPCRE2_EXTRA_ALLOW_SURROGATE_ESCAPESβ Allow\x{d800}to\x{dfff}in UTF-8 and UTF-32 modesPCRE2_EXTRA_ALT_BSUXβ Extended alternate\u,\U, and\xhandlingPCRE2_EXTRA_ASCII_BSDβ\dremains ASCII in UCP modePCRE2_EXTRA_ASCII_BSSβ\sremains ASCII in UCP modePCRE2_EXTRA_ASCII_BSWβ\wremains ASCII in UCP modePCRE2_EXTRA_ASCII_DIGITβ[:digit:]and[:xdigit:]POSIX classes remain ASCII in UCP modePCRE2_EXTRA_ASCII_POSIXβ POSIX classes remain ASCII in UCP modePCRE2_EXTRA_BAD_ESCAPE_IS_LITERALβ Treat all invalid escapes as a literal following characterPCRE2_EXTRA_CASELESS_RESTRICTβ Disable mixed ASCII/non-ASCII case foldingPCRE2_EXTRA_ESCAPED_CR_IS_LFβ Interpret\ras\nPCRE2_EXTRA_MATCH_LINEβ Pattern matches whole linesPCRE2_EXTRA_MATCH_WORDβ Pattern matches "words"PCRE2_EXTRA_NEVER_CALLOUTβ Disallow callouts in patternPCRE2_EXTRA_NO_BS0β Disallow\0(but not\00or\000)PCRE2_EXTRA_PYTHON_OCTALβ Use Python rules for octalPCRE2_EXTRA_TURKISH_CASINGβ Use Turkish I case folding
like, seventeen of them. seventeen! we ate π β¨
and if you want the full lore, 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 them, iykyk π«Ά
mwah, that's the whole page β this one's from PCRE2 10.47, dated 14 October 2024, and it's the PCRE2_SET_...TRA_OPTIONS(3) page, so like... go forth and set your compile extra options, bestie π
π¦ 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