PCRE2_SUBSTRING_LIST_GET(3)Library Functions ManualPCRE2_SUBSTRING_LIST_GET(3) NNAAMMEE PCRE2 - Perl-compatible regular expressions (revised API) SSYYNNOOPPSSIISS ##iinncclluuddee <> iinntt ppccrree22__ssuubbssttrriinngg__lliisstt__ggeett((ppccrree22__mmaattcchh__ddaattaa **_m_a_t_c_h___d_a_t_a,, PPCCRREE22__UUCCHHAARR ******_l_i_s_t_p_t_r,, PPCCRREE22__SSIIZZEE ****_l_e_n_g_t_h_s_p_t_r));; DDEESSCCRRIIPPTTIIOONN This is a convenience function for extracting all the captured sub- strings after a pattern match. It builds a list of pointers to the strings, and (optionally) a second list that contains their lengths (in code units), excluding a terminating zero that is added to each of them. All this is done in a single block of memory that is obtained using the same memory allocation function that was used to get the match data block. The convenience function ppccrree22__ssuubbssttrriinngg__lliisstt__ffrreeee(()) can be used to free it when it is no longer needed. The arguments are: _m_a_t_c_h___d_a_t_a The match data block _l_i_s_t_p_t_r Where to put a pointer to the list _l_e_n_g_t_h_s_p_t_r Where to put a pointer to the lengths, or NULL A pointer to a list of pointers is put in the variable whose address is in _l_i_s_t_p_t_r. The list is terminated by a NULL pointer. If _l_e_n_g_t_h_s_p_t_r is not NULL, a matching list of lengths is created, and its address is placed in _l_e_n_g_t_h_s_p_t_r. The yield of the function is zero on success or PCRE2_ERROR_NOMEMORY if sufficient memory could not be obtained. 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.00 21 October 2014 PCRE2_SUBSTRING_LIST_GET(3)