1PCRE_GET_SUBSTRING_LIST(3) Library Functions Manual PCRE_GET_SUBSTRING_LIST(3)
2
3
4

NAME

6       PCRE - Perl-compatible regular expressions
7

SYNOPSIS

9
10       #include <pcre.h>
11
12       int pcre_get_substring_list(const char *subject,
13            int *ovector, int stringcount, const char ***listptr);
14
15       int pcre16_get_substring_list(PCRE_SPTR16 subject,
16            int *ovector, int stringcount, PCRE_SPTR16 **listptr);
17
18       int pcre32_get_substring_list(PCRE_SPTR32 subject,
19            int *ovector, int stringcount, PCRE_SPTR32 **listptr);
20

DESCRIPTION

22
23       This  is  a  convenience function for extracting a list of all the cap‐
24       tured substrings. The arguments are:
25
26         subject       Subject that has been successfully matched
27         ovector       Offset vector that pcre[16|32]_exec used
28         stringcount   Value returned by pcre[16|32]_exec
29         listptr       Where to put a pointer to the list
30
31       The memory in which the substrings and the list are placed is  obtained
32       by    calling    pcre[16|32]_malloc().    The    convenience   function
33       pcre[16|32]_free_substring_list() can be used to free it when it is  no
34       longer  needed.  A pointer to a list of pointers is put in the variable
35       whose address is in listptr. The list is terminated by a NULL  pointer.
36       The  yield of the function is zero on success or PCRE_ERROR_NOMEMORY if
37       sufficient memory could not be obtained.
38
39       There is a complete description of the PCRE native API in  the  pcreapi
40       page and a description of the POSIX API in the pcreposix page.
41
42
43
44PCRE 8.30                        24 June 2012       PCRE_GET_SUBSTRING_LIST(3)
Impressum