---
name: "pcre_config"
section: "3"
platform: "linux"
package: "pcre"
version: "8.45-5"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/pcre_config"
---

# pcre\_config(3)

Perl-compatible regular expressions

## NAME

PCRE - Perl-compatible regular expressions

## SYNOPSIS

**#include \<pcre.h\>**

**int pcre\_config(int *what*, void \**where*);**

**int pcre16\_config(int *what*, void \**where*);**

**int pcre32\_config(int *what*, void \**where*);**

## DESCRIPTION

This function makes it possible for a client program to find out which optional features are available in the version of the PCRE library it is using. The arguments are as follows:

  *what*     A code specifying what information is required\
   *where*    Points to where to put the data

The *where* argument must point to an integer variable, except for PCRE\_CONFIG\_MATCH\_LIMIT, PCRE\_CONFIG\_MATCH\_LIMIT\_RECURSION, and PCRE\_CONFIG\_PARENS\_LIMIT, when it must point to an unsigned long integer, and for PCRE\_CONFIG\_JITTARGET, when it must point to a const char\*. The available codes are:

  PCRE\_CONFIG\_JIT           Availability of just-in-time compiler\
                               support (1=yes 0=no)\
   PCRE\_CONFIG\_JITTARGET     String containing information about the\
                               target architecture for the JIT compiler,\
                               or NULL if there is no JIT support\
   PCRE\_CONFIG\_LINK\_SIZE     Internal link size: 2, 3, or 4\
   PCRE\_CONFIG\_PARENS\_LIMIT  Parentheses nesting limit\
   PCRE\_CONFIG\_MATCH\_LIMIT   Internal resource limit\
   PCRE\_CONFIG\_MATCH\_LIMIT\_RECURSION\
                             Internal recursion depth limit\
   PCRE\_CONFIG\_NEWLINE       Value of the default newline sequence:\
                                 13 (0x000d)    for CR\
                                 10 (0x000a)    for LF\
                               3338 (0x0d0a)    for CRLF\
                                 \-2             for ANYCRLF\
                                 \-1             for ANY\
   PCRE\_CONFIG\_BSR           Indicates what \\R matches by default:\
                                  0             all Unicode line endings\
                                  1             CR, LF, or CRLF only\
   PCRE\_CONFIG\_POSIX\_MALLOC\_THRESHOLD\
                             Threshold of return slots, above which\
                               **malloc()** is used by the POSIX API\
   PCRE\_CONFIG\_STACKRECURSE  Recursion implementation (1=stack 0=heap)\
   PCRE\_CONFIG\_UTF16         Availability of UTF-16 support (1=yes\
                                0=no); option for **pcre16\_config()**\
   PCRE\_CONFIG\_UTF32         Availability of UTF-32 support (1=yes\
                                0=no); option for **pcre32\_config()**\
   PCRE\_CONFIG\_UTF8          Availability of UTF-8 support (1=yes 0=no);\
                               option for **pcre\_config()**\
   PCRE\_CONFIG\_UNICODE\_PROPERTIES\
                             Availability of Unicode property support\
                               (1=yes 0=no)

The function yields 0 on success or PCRE\_ERROR\_BADOPTION otherwise. That error is also given if PCRE\_CONFIG\_UTF16 or PCRE\_CONFIG\_UTF32 is passed to **pcre\_config()**, if PCRE\_CONFIG\_UTF8 or PCRE\_CONFIG\_UTF32 is passed to **pcre16\_config()**, or if PCRE\_CONFIG\_UTF8 or PCRE\_CONFIG\_UTF16 is passed to **pcre32\_config()**.

There is a complete description of the PCRE native API in the **pcreapi** page and a description of the POSIX API in the **pcreposix** page.
