1 .TH PCRE_FULLINFO 3 "24 June 2012" "PCRE 8.30"
3 PCRE - Perl-compatible regular expressions
10 .B int pcre_fullinfo(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
11 .B " int \fIwhat\fP, void *\fIwhere\fP);"
13 .B int pcre16_fullinfo(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
14 .B " int \fIwhat\fP, void *\fIwhere\fP);"
16 .B int pcre32_fullinfo(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP,"
17 .B " int \fIwhat\fP, void *\fIwhere\fP);"
23 This function returns information about a compiled pattern. Its arguments are:
25 \fIcode\fP Compiled regular expression
26 \fIextra\fP Result of \fBpcre[16|32]_study()\fP or NULL
27 \fIwhat\fP What information is required
28 \fIwhere\fP Where to put the information
30 The following information is available:
32 PCRE_INFO_BACKREFMAX Number of highest back reference
33 PCRE_INFO_CAPTURECOUNT Number of capturing subpatterns
34 PCRE_INFO_DEFAULT_TABLES Pointer to default tables
35 PCRE_INFO_FIRSTBYTE Fixed first data unit for a match, or
36 -1 for start of string
39 PCRE_INFO_FIRSTTABLE Table of first data units (after studying)
40 PCRE_INFO_HASCRORLF Return 1 if explicit CR or LF matches exist
41 PCRE_INFO_JCHANGED Return 1 if (?J) or (?-J) was used
42 PCRE_INFO_JIT Return 1 after successful JIT compilation
43 PCRE_INFO_JITSIZE Size of JIT compiled code
44 PCRE_INFO_LASTLITERAL Literal last data unit required
45 PCRE_INFO_MINLENGTH Lower bound length of matching strings
46 PCRE_INFO_NAMECOUNT Number of named subpatterns
47 PCRE_INFO_NAMEENTRYSIZE Size of name table entry
48 PCRE_INFO_NAMETABLE Pointer to name table
49 PCRE_INFO_OKPARTIAL Return 1 if partial matching can be tried
50 (always returns 1 after release 8.00)
51 PCRE_INFO_OPTIONS Option bits used for compilation
52 PCRE_INFO_SIZE Size of compiled pattern
53 PCRE_INFO_STUDYSIZE Size of study data
54 PCRE_INFO_FIRSTCHARACTER Fixed first data unit for a match
55 PCRE_INFO_FIRSTCHARACTERFLAGS Returns
56 1 if there is a first data character set, which can
57 then be retrieved using PCRE_INFO_FIRSTCHARACTER,
58 2 if the first character is at the start of the data
59 string or after a newline, and
61 PCRE_INFO_REQUIREDCHAR Literal last data unit required
62 PCRE_INFO_REQUIREDCHARFLAGS Returns 1 if the last data character is set (which can then
63 be retrieved using PCRE_INFO_REQUIREDCHAR); 0 otherwise
65 The \fIwhere\fP argument must point to an integer variable, except for the
66 following \fIwhat\fP values:
68 PCRE_INFO_DEFAULT_TABLES const unsigned char *
69 PCRE_INFO_FIRSTTABLE const unsigned char *
70 PCRE_INFO_NAMETABLE PCRE_SPTR16 (16-bit library)
71 PCRE_INFO_NAMETABLE PCRE_SPTR32 (32-bit library)
72 PCRE_INFO_NAMETABLE const unsigned char * (8-bit library)
73 PCRE_INFO_OPTIONS unsigned long int
75 PCRE_INFO_FIRSTCHARACTER uint32_t
76 PCRE_INFO_REQUIREDCHAR uint32_t
78 The yield of the function is zero on success or:
80 PCRE_ERROR_NULL the argument \fIcode\fP was NULL
81 the argument \fIwhere\fP was NULL
82 PCRE_ERROR_BADMAGIC the "magic number" was not found
83 PCRE_ERROR_BADOPTION the value of \fIwhat\fP was invalid
85 There is a complete description of the PCRE native API in the
89 page and a description of the POSIX API in the