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 (not necessarily in this order):
28
29 uint32_t version Block version number
30 uint32_t callout_number Number for numbered callouts
31 PCRE2_SIZE pattern_position Offset to next item in pattern
32 PCRE2_SIZE next_item_length Length of next item in pattern
33 PCRE2_SIZE callout_string_offset Offset to string within pattern
34 PCRE2_SIZE callout_string_length Length of callout string
35 PCRE2_SPTR callout_string Points to callout string or is NULL
36
37 The second argument passed to the callback() function is the callout
38 data that was passed to pcre2_callout_enumerate(). The callback() func‐
39 tion must return zero for success. Any other value causes the pattern
40 scan to stop, with the value being passed back as the result of
41 pcre2_callout_enumerate().
42
43 There is a complete description of the PCRE2 native API in the pcre2api
44 page and a description of the POSIX API in the pcre2posix page.
45
46
47
48PCRE2 10.30 23 March 2017 PCRE2_COMPILE(3)