PCRE2_COMPILE(3) Library Functions Manual PCRE2_COMPILE(3) NNAAMMEE PCRE2 - Perl-compatible regular expressions (revised API) SSYYNNOOPPSSIISS ##iinncclluuddee <
> iinntt ppccrree22__ccaalllloouutt__eennuummeerraattee((ccoonnsstt ppccrree22__ccooddee **_c_o_d_e,, iinntt ((**_c_a_l_l_b_a_c_k))((ppccrree22__ccaalllloouutt__eennuummeerraattee__bblloocckk **,, vvooiidd **)),, vvooiidd **_c_a_l_l_o_u_t___d_a_t_a));; DDEESSCCRRIIPPTTIIOONN This function scans a compiled regular expression and calls the _c_a_l_l_- _b_a_c_k_(_) function for each callout within the pattern. The yield of the function is zero for success and non-zero otherwise. The arguments are: _c_o_d_e Points to the compiled pattern _c_a_l_l_b_a_c_k The callback function _c_a_l_l_o_u_t___d_a_t_a User data that is passed to the callback The _c_a_l_l_b_a_c_k_(_) function is passed a pointer to a data block containing the following fields (not necessarily in this order): uint32_t _v_e_r_s_i_o_n Block version number uint32_t _c_a_l_l_o_u_t___n_u_m_b_e_r Number for numbered callouts PCRE2_SIZE _p_a_t_t_e_r_n___p_o_s_i_t_i_o_n Offset to next item in pattern PCRE2_SIZE _n_e_x_t___i_t_e_m___l_e_n_g_t_h Length of next item in pattern PCRE2_SIZE _c_a_l_l_o_u_t___s_t_r_i_n_g___o_f_f_s_e_t Offset to string within pattern PCRE2_SIZE _c_a_l_l_o_u_t___s_t_r_i_n_g___l_e_n_g_t_h Length of callout string PCRE2_SPTR _c_a_l_l_o_u_t___s_t_r_i_n_g Points to callout string or is NULL The second argument passed to the ccaallllbbaacckk(()) function is the callout data that was passed to ppccrree22__ccaalllloouutt__eennuummeerraattee(()). The ccaallllbbaacckk(()) func- tion must return zero for success. Any other value causes the pattern scan to stop, with the value being passed back as the result of ppccrree22__ccaalllloouutt__eennuummeerraattee(()). There is a complete description of the PCRE2 native API in the ppccrree22aappii page and a description of the POSIX API in the ppccrree22ppoossiixx page. PCRE2 10.30 23 March 2017 PCRE2_COMPILE(3)