1 .TH PCRE2_COMPILE 3 "23 March 2017" "PCRE2 10.30"
3 PCRE2 - Perl-compatible regular expressions (revised API)
10 .B int pcre2_callout_enumerate(const pcre2_code *\fIcode\fP,
11 .B " int (*\fIcallback\fP)(pcre2_callout_enumerate_block *, void *),"
12 .B " void *\fIcallout_data\fP);"
18 This function scans a compiled regular expression and calls the \fIcallback()\fP
19 function for each callout within the pattern. The yield of the function is zero
20 for success and non-zero otherwise. The arguments are:
22 \fIcode\fP Points to the compiled pattern
23 \fIcallback\fP The callback function
24 \fIcallout_data\fP User data that is passed to the callback
26 The \fIcallback()\fP function is passed a pointer to a data block containing
27 the following fields (not necessarily in this order):
29 uint32_t \fIversion\fP Block version number
30 uint32_t \fIcallout_number\fP Number for numbered callouts
31 PCRE2_SIZE \fIpattern_position\fP Offset to next item in pattern
32 PCRE2_SIZE \fInext_item_length\fP Length of next item in pattern
33 PCRE2_SIZE \fIcallout_string_offset\fP Offset to string within pattern
34 PCRE2_SIZE \fIcallout_string_length\fP Length of callout string
35 PCRE2_SPTR \fIcallout_string\fP Points to callout string or is NULL
37 The second argument passed to the \fBcallback()\fP function is the callout data
38 that was passed to \fBpcre2_callout_enumerate()\fP. The \fBcallback()\fP
39 function must return zero for success. Any other value causes the pattern scan
40 to stop, with the value being passed back as the result of
41 \fBpcre2_callout_enumerate()\fP.
43 There is a complete description of the PCRE2 native API in the
47 page and a description of the POSIX API in the