|
NAME | SYNOPSIS | DESCRIPTION | COLOPHON |
|
|
|
PCRE2_SET_OPTIMIZE(3) Library Functions Manual PCRE2_SET_OPTIMIZE(3)
PCRE2 - Perl-compatible regular expressions (revised API)
#include <pcre2.h>
int pcre2_set_optimize(pcre2_compile_context *ccontext,
uint32_t directive);
This function controls which performance optimizations will be
applied by pcre2_compile(). It can be called multiple times with
the same compile context; the effects are cumulative, with the
effects of later calls taking precedence over earlier ones.
The result is zero for success, PCRE2_ERROR_NULL if ccontext is
NULL, or PCRE2_ERROR_BADOPTION if directive is unknown. The latter
could be useful to detect if a certain optimization is available.
The list of possible values for the directive parameter are:
PCRE2_OPTIMIZATION_FULL Enable all optimizations (default)
PCRE2_OPTIMIZATION_NONE Disable all optimizations
PCRE2_AUTO_POSSESS Enable auto-possessification
PCRE2_AUTO_POSSESS_OFF Disable auto-possessification
PCRE2_DOTSTAR_ANCHOR Enable implicit dotstar anchoring
PCRE2_DOTSTAR_ANCHOR_OFF Disable implicit dotstar anchoring
PCRE2_START_OPTIMIZE Enable start-up optimizations at match
time
PCRE2_START_OPTIMIZE_OFF Disable start-up optimizations at
match time
There is a complete description of the PCRE2 native API, including
detailed descriptions directive parameter values in the pcre2api
page.
This page is part of the PCRE (Perl Compatible Regular
Expressions) project. Information about the project can be found
at ⟨http://www.pcre.org/⟩. If you have a bug report for this
manual page, see
⟨http://bugs.exim.org/enter_bug.cgi?product=PCRE⟩. This page was
obtained from the tarball fetched from
⟨https://github.com/PhilipHazel/pcre2.git⟩ on 2025-08-11. If you
discover any rendering problems in this HTML version of the page,
or you believe there is a better or more up-to-date source for the
page, or you have corrections or improvements to the information
in this COLOPHON (which is not part of the original manual page),
send a mail to [email protected]
PCRE2 10.46-DEV 22 September 2024 PCRE2_SET_OPTIMIZE(3)