chiark / gitweb /
pcre3 (1:8.30-5) unstable; urgency=low
[pcre3.git] / doc / html / pcre_fullinfo.html
1 <html>
2 <head>
3 <title>pcre_fullinfo specification</title>
4 </head>
5 <body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
6 <h1>pcre_fullinfo man page</h1>
7 <p>
8 Return to the <a href="index.html">PCRE index page</a>.
9 </p>
10 <p>
11 This page is part of the PCRE HTML documentation. It was generated automatically
12 from the original man page. If there is any nonsense in it, please consult the
13 man page, in case the conversion went wrong.
14 <br>
15 <br><b>
16 SYNOPSIS
17 </b><br>
18 <P>
19 <b>#include &#60;pcre.h&#62;</b>
20 </P>
21 <P>
22 <b>int pcre_fullinfo(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
23 <b>int <i>what</i>, void *<i>where</i>);</b>
24 </P>
25 <P>
26 <b>int pcre16_fullinfo(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b>
27 <b>int <i>what</i>, void *<i>where</i>);</b>
28 </P>
29 <br><b>
30 DESCRIPTION
31 </b><br>
32 <P>
33 This function returns information about a compiled pattern. Its arguments are:
34 <pre>
35   <i>code</i>                      Compiled regular expression
36   <i>extra</i>                     Result of <b>pcre[16]_study()</b> or NULL
37   <i>what</i>                      What information is required
38   <i>where</i>                     Where to put the information
39 </pre>
40 The following information is available:
41 <pre>
42   PCRE_INFO_BACKREFMAX      Number of highest back reference
43   PCRE_INFO_CAPTURECOUNT    Number of capturing subpatterns
44   PCRE_INFO_DEFAULT_TABLES  Pointer to default tables
45   PCRE_INFO_FIRSTBYTE       Fixed first data unit for a match, or
46                               -1 for start of string
47                                  or after newline, or
48                               -2 otherwise
49   PCRE_INFO_FIRSTTABLE      Table of first data units (after studying)
50   PCRE_INFO_HASCRORLF       Return 1 if explicit CR or LF matches exist
51   PCRE_INFO_JCHANGED        Return 1 if (?J) or (?-J) was used
52   PCRE_INFO_JIT             Return 1 after successful JIT compilation
53   PCRE_INFO_JITSIZE         Size of JIT compiled code
54   PCRE_INFO_LASTLITERAL     Literal last data unit required
55   PCRE_INFO_MINLENGTH       Lower bound length of matching strings
56   PCRE_INFO_NAMECOUNT       Number of named subpatterns
57   PCRE_INFO_NAMEENTRYSIZE   Size of name table entry
58   PCRE_INFO_NAMETABLE       Pointer to name table
59   PCRE_INFO_OKPARTIAL       Return 1 if partial matching can be tried
60                               (always returns 1 after release 8.00)
61   PCRE_INFO_OPTIONS         Option bits used for compilation
62   PCRE_INFO_SIZE            Size of compiled pattern
63   PCRE_INFO_STUDYSIZE       Size of study data
64 </pre>
65 The <i>where</i> argument must point to an integer variable, except for the
66 following <i>what</i> values:
67 <pre>
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       const unsigned char * (8-bit library)
72   PCRE_INFO_OPTIONS         unsigned long int
73   PCRE_INFO_SIZE            size_t
74 </pre>
75 The yield of the function is zero on success or:
76 <pre>
77   PCRE_ERROR_NULL           the argument <i>code</i> was NULL
78                             the argument <i>where</i> was NULL
79   PCRE_ERROR_BADMAGIC       the "magic number" was not found
80   PCRE_ERROR_BADOPTION      the value of <i>what</i> was invalid
81 </PRE>
82 </P>
83 <P>
84 There is a complete description of the PCRE native API in the
85 <a href="pcreapi.html"><b>pcreapi</b></a>
86 page and a description of the POSIX API in the
87 <a href="pcreposix.html"><b>pcreposix</b></a>
88 page.
89 <p>
90 Return to the <a href="index.html">PCRE index page</a>.
91 </p>