1PCRE_FULLINFO(3)           Library Functions Manual           PCRE_FULLINFO(3)
2
3
4

NAME

6       PCRE - Perl-compatible regular expressions
7

SYNOPSIS

9
10       #include <pcre.h>
11
12       int pcre_fullinfo(const pcre *code, const pcre_extra *extra,
13            int what, void *where);
14
15       int pcre16_fullinfo(const pcre16 *code, const pcre16_extra *extra,
16            int what, void *where);
17
18       int pcre32_fullinfo(const pcre32 *code, const pcre32_extra *extra,
19            int what, void *where);
20

DESCRIPTION

22
23       This  function  returns information about a compiled pattern. Its argu‐
24       ments are:
25
26         code                      Compiled regular expression
27         extra                     Result of pcre[16|32]_study() or NULL
28         what                      What information is required
29         where                     Where to put the information
30
31       The following information is available:
32
33         PCRE_INFO_BACKREFMAX      Number of highest back reference
34         PCRE_INFO_CAPTURECOUNT    Number of capturing subpatterns
35         PCRE_INFO_DEFAULT_TABLES  Pointer to default tables
36         PCRE_INFO_FIRSTBYTE       Fixed first data unit for a match, or
37                                     -1 for start of string
38                                        or after newline, or
39                                     -2 otherwise
40         PCRE_INFO_FIRSTTABLE      Table of first data units (after studying)
41         PCRE_INFO_HASCRORLF       Return 1 if explicit CR or LF matches exist
42         PCRE_INFO_JCHANGED        Return 1 if (?J) or (?-J) was used
43         PCRE_INFO_JIT             Return 1 after successful JIT compilation
44         PCRE_INFO_JITSIZE         Size of JIT compiled code
45         PCRE_INFO_LASTLITERAL     Literal last data unit required
46         PCRE_INFO_MINLENGTH       Lower bound length of matching strings
47         PCRE_INFO_MATCHEMPTY      Return 1 if the pattern can match an  empty
48       string,
49                                      0 otherwise
50         PCRE_INFO_MATCHLIMIT         Match    limit    if    set,   otherwise
51       PCRE_RROR_UNSET
52         PCRE_INFO_MAXLOOKBEHIND   Length (in characters) of the longest look‐
53       behind assertion
54         PCRE_INFO_NAMECOUNT       Number of named subpatterns
55         PCRE_INFO_NAMEENTRYSIZE   Size of name table entry
56         PCRE_INFO_NAMETABLE       Pointer to name table
57         PCRE_INFO_OKPARTIAL       Return 1 if partial matching can be tried
58                                     (always returns 1 after release 8.00)
59         PCRE_INFO_OPTIONS         Option bits used for compilation
60         PCRE_INFO_SIZE            Size of compiled pattern
61         PCRE_INFO_STUDYSIZE       Size of study data
62         PCRE_INFO_FIRSTCHARACTER      Fixed first data unit for a match
63         PCRE_INFO_FIRSTCHARACTERFLAGS Returns
64                                         1  if there is a first data character
65       set, which can
66                                           then     be     retrieved     using
67       PCRE_INFO_FIRSTCHARACTER,
68                                         2  if  the  first character is at the
69       start of the data
70                                           string or after a newline, and
71                                         0 otherwise
72         PCRE_INFO_RECURSIONLIMIT     Recursion  limit   if   set,   otherwise
73       PCRE_ERROR_UNSET
74         PCRE_INFO_REQUIREDCHAR      Literal last data unit required
75         PCRE_INFO_REQUIREDCHARFLAGS  Returns  1 if the last data character is
76       set (which can then
77                                     be  retrieved  using  PCRE_INFO_REQUIRED‐
78       CHAR); 0 otherwise
79
80       The  where  argument  must point to an integer variable, except for the
81       following what values:
82
83         PCRE_INFO_DEFAULT_TABLES  const uint8_t *
84         PCRE_INFO_FIRSTCHARACTER  uint32_t
85         PCRE_INFO_FIRSTTABLE      const uint8_t *
86         PCRE_INFO_JITSIZE         size_t
87         PCRE_INFO_MATCHLIMIT      uint32_t
88         PCRE_INFO_NAMETABLE       PCRE_SPTR16           (16-bit library)
89         PCRE_INFO_NAMETABLE       PCRE_SPTR32           (32-bit library)
90         PCRE_INFO_NAMETABLE       const unsigned char * (8-bit library)
91         PCRE_INFO_OPTIONS         unsigned long int
92         PCRE_INFO_SIZE            size_t
93         PCRE_INFO_STUDYSIZE       size_t
94         PCRE_INFO_RECURSIONLIMIT  uint32_t
95         PCRE_INFO_REQUIREDCHAR    uint32_t
96
97       The yield of the function is zero on success or:
98
99         PCRE_ERROR_NULL           the argument code was NULL
100                                   the argument where was NULL
101         PCRE_ERROR_BADMAGIC       the "magic number" was not found
102         PCRE_ERROR_BADOPTION      the value of what was invalid
103         PCRE_ERROR_UNSET          the option was not set
104
105       There is a complete description of the PCRE native API in  the  pcreapi
106       page and a description of the POSIX API in the pcreposix page.
107
108
109
110PCRE 8.36                        21 April 2014                PCRE_FULLINFO(3)
Impressum