PCRE2_SET_DEPTH_LIMIT(3)
okay so buckle up bestie π«Ά β this page lives in the Library Functions Manual for PCRE2, and the star of the show is PCRE2_SET_DEPTH_LIMIT(3). Itβs short, itβs cute, it still ate π
.
πΈ NAME πΈ
PCRE2 - Perl-compatible regular expressions (revised API). Thatβs the name, thatβs the vibe: revised-API main character energy, no cap π.
β¨ SYNOPSIS β¨
#include <pcre2.h>
int pcre2_set_depth_limit(pcre2_match_context *mcontext,
uint32_t value);
π DESCRIPTION π
Okay so hereβs the literal tea β: this function sets the backtracking depth limit field in a match context. Thatβs the whole job. You hand it a pcre2_match_context *mcontext and a uint32_t value, and it sets that field. The result is always zero. Always. Zero. Not a maybe-zero, not a sometimes-zero β always zero π.
If you want the full lore, 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. Go read those for the deep dive, iykyk πβ¨.
thatβs it, bestie π β this page is serving PCRE2 10.47, dated 25 March 2017. mwah, go set those depth limits and slay π
π¦ 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