1PCRE2_COMPILE(3) Library Functions Manual PCRE2_COMPILE(3)
2
3
4
6 PCRE2 - Perl-compatible regular expressions (revised API)
7
9
10 #include <pcre2.h>
11
12 int pcre2_callout_enumerate(const pcre2_code *code,
13 int (*callback)(pcre2_callout_enumerate_block *, void *),
14 void *callout_data);
15
17
18 This function scans a compiled regular expression and calls the call‐
19 back() function for each callout within the pattern. The yield of the
20 function is zero for success and non-zero otherwise. The arguments are:
21
22 code Points to the compiled pattern
23 callback The callback function
24 callout_data User data that is passed to the callback
25
26 The callback() function is passed a pointer to a data block containing
27 the following fields:
28
29 version Block version number
30 pattern_position Offset to next item in pattern
31 next_item_length Length of next item in pattern
32 callout_number Number for numbered callouts
33 callout_string_offset Offset to string within pattern
34 callout_string_length Length of callout string
35 callout_string Points to callout string or is NULL
36
37 The second argument is the callout data that was passed to pcre2_call‐
38 out_enumerate(). The callback() function must return zero for success.
39 Any other value causes the pattern scan to stop, with the value being
40 passed back as the result of pcre2_callout_enumerate().
41
42 There is a complete description of the PCRE2 native API in the pcre2api
43 page and a description of the POSIX API in the pcre2posix page.
44
45
46
47PCRE2 10.20 23 March 2015 PCRE2_COMPILE(3)