3 <title>pcre2_callout_enumerate specification</title>
5 <body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
6 <h1>pcre2_callout_enumerate man page</h1>
8 Return to the <a href="index.html">PCRE2 index page</a>.
11 This page is part of the PCRE2 HTML documentation. It was generated
12 automatically from the original man page. If there is any nonsense in it,
13 please consult the man page, in case the conversion went wrong.
19 <b>#include <pcre2.h></b>
22 <b>int pcre2_callout_enumerate(const pcre2_code *<i>code</i>,</b>
23 <b> int (*<i>callback</i>)(pcre2_callout_enumerate_block *, void *),</b>
24 <b> void *<i>callout_data</i>);</b>
30 This function scans a compiled regular expression and calls the <i>callback()</i>
31 function for each callout within the pattern. The yield of the function is zero
32 for success and non-zero otherwise. The arguments are:
34 <i>code</i> Points to the compiled pattern
35 <i>callback</i> The callback function
36 <i>callout_data</i> User data that is passed to the callback
38 The <i>callback()</i> function is passed a pointer to a data block containing
39 the following fields (not necessarily in this order):
41 uint32_t <i>version</i> Block version number
42 uint32_t <i>callout_number</i> Number for numbered callouts
43 PCRE2_SIZE <i>pattern_position</i> Offset to next item in pattern
44 PCRE2_SIZE <i>next_item_length</i> Length of next item in pattern
45 PCRE2_SIZE <i>callout_string_offset</i> Offset to string within pattern
46 PCRE2_SIZE <i>callout_string_length</i> Length of callout string
47 PCRE2_SPTR <i>callout_string</i> Points to callout string or is NULL
49 The second argument passed to the <b>callback()</b> function is the callout data
50 that was passed to <b>pcre2_callout_enumerate()</b>. The <b>callback()</b>
51 function must return zero for success. Any other value causes the pattern scan
52 to stop, with the value being passed back as the result of
53 <b>pcre2_callout_enumerate()</b>.
56 There is a complete description of the PCRE2 native API in the
57 <a href="pcre2api.html"><b>pcre2api</b></a>
58 page and a description of the POSIX API in the
59 <a href="pcre2posix.html"><b>pcre2posix</b></a>
62 Return to the <a href="index.html">PCRE2 index page</a>.