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

NAME

6       PCRE - Perl-compatible regular expressions
7

SYNOPSIS

9
10       #include <pcre.h>
11
12       int pcre_copy_substring(const char *subject, int *ovector,
13            int stringcount, int stringnumber, char *buffer,
14            int buffersize);
15

DESCRIPTION

17
18       This is a convenience function for extracting a captured substring into
19       a given buffer. The arguments are:
20
21         subject       Subject that has been successfully matched
22         ovector       Offset vector that pcre_exec() used
23         stringcount   Value returned by pcre_exec()
24         stringnumber  Number of the required substring
25         buffer        Buffer to receive the string
26         buffersize    Size of buffer
27
28       The yield is the length of the string, PCRE_ERROR_NOMEMORY if the  buf‐
29       fer  was  too  small, or PCRE_ERROR_NOSUBSTRING if the string number is
30       invalid.
31
32       There is a complete description of the PCRE native API in  the  pcreapi
33       page and a description of the POSIX API in the pcreposix page.
34
35
36
37                                                        PCRE_COPY_SUBSTRING(3)
Impressum