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_NAMECOUNT       Number of named subpatterns
48         PCRE_INFO_NAMEENTRYSIZE   Size of name table entry
49         PCRE_INFO_NAMETABLE       Pointer to name table
50         PCRE_INFO_OKPARTIAL       Return 1 if partial matching can be tried
51                                     (always returns 1 after release 8.00)
52         PCRE_INFO_OPTIONS         Option bits used for compilation
53         PCRE_INFO_SIZE            Size of compiled pattern
54         PCRE_INFO_STUDYSIZE       Size of study data
55         PCRE_INFO_FIRSTCHARACTER      Fixed first data unit for a match
56         PCRE_INFO_FIRSTCHARACTERFLAGS Returns
57                                         1 if there is a first data  character
58       set, which can
59                                           then     be     retrieved     using
60       PCRE_INFO_FIRSTCHARACTER,
61                                         2 if the first character  is  at  the
62       start of the data
63                                           string or after a newline, and
64                                         0 otherwise
65         PCRE_INFO_REQUIREDCHAR      Literal last data unit required
66         PCRE_INFO_REQUIREDCHARFLAGS  Returns  1 if the last data character is
67       set (which can then
68                                     be  retrieved  using  PCRE_INFO_REQUIRED‐
69       CHAR); 0 otherwise
70
71       The  where  argument  must point to an integer variable, except for the
72       following what values:
73
74         PCRE_INFO_DEFAULT_TABLES  const unsigned char *
75         PCRE_INFO_FIRSTTABLE      const unsigned char *
76         PCRE_INFO_NAMETABLE       PCRE_SPTR16           (16-bit library)
77         PCRE_INFO_NAMETABLE       PCRE_SPTR32           (32-bit library)
78         PCRE_INFO_NAMETABLE       const unsigned char * (8-bit library)
79         PCRE_INFO_OPTIONS         unsigned long int
80         PCRE_INFO_SIZE            size_t
81         PCRE_INFO_FIRSTCHARACTER  uint32_t
82         PCRE_INFO_REQUIREDCHAR    uint32_t
83
84       The yield of the function is zero on success or:
85
86         PCRE_ERROR_NULL           the argument code was NULL
87                                   the argument where was NULL
88         PCRE_ERROR_BADMAGIC       the "magic number" was not found
89         PCRE_ERROR_BADOPTION      the value of what was invalid
90
91       There is a complete description of the PCRE native API in  the  pcreapi
92       page and a description of the POSIX API in the pcreposix page.
93
94
95
96PCRE 8.30                        24 June 2012                 PCRE_FULLINFO(3)
Impressum