PCRE_MAKETABLES(3)
π PCRE_MAKETABLES π
ok so this is a page from the Library Functions Manual, bestie β it's PCRE_MAKETABLES(3) and it's all about building character tables. yes, literally. let's go π¦
β¨ NAME β¨
PCRE β Perl-compatible regular expressions π
β¨ SYNOPSIS β¨
#include <pcre.h>
const unsigned char *pcre_maketables(void);
const unsigned char *pcre16_maketables(void);
const unsigned char *pcre32_maketables(void);
like. three whole functions. all of them taking zero arguments. iconic behaviour tbh π
β¨ DESCRIPTION β¨
okay so this function builds a set of character tables for character values less than 256. that's the whole gig. character values. under 256. slay π
and what do you do with these tables?? you can pass them to pcre[16|32]_compile() to override PCRE's internal, built-in tables β which, fun fact, were made by pcre[16|32]_maketables() back when PCRE was compiled. so you're basically overriding the tables that were themselves made by the very same family of functions. generational. π§
when would you even want to do this?? if you are using a non-standard locale. that's the vibe check right there. non-standard locale = you might wanna swap in your own tables. periodt.
and the function yields a pointer to the tables. so you get a const unsigned char * back. don't lose it. π
ngl there is also a complete description of the PCRE native API in thepcreapipage, and a description of the POSIX API in thepcreposixpage. go read those too bestie, they're right there π
π SEE ALSO π
pcreapiβ the complete description of the PCRE native APIpcreposixβ the description of the POSIX API
ok that's the whole page, no cap. π
and for the cute sign-off: this lil masterpiece is from PCRE 8.30, dated 24 June 2012, and it lives in the Library Functions Manual β so shoutout to the manual page PCRE_MAKETABLES(3), we love her, we respect her, bye bestie π«ΆπΈ
π¦ 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