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
16       int pcre16_copy_substring(PCRE_SPTR16 subject, int *ovector,
17            int stringcount, int stringnumber, PCRE_UCHAR16 *buffer,
18            int buffersize);
19
20       int pcre32_copy_substring(PCRE_SPTR32 subject, int *ovector,
21            int stringcount, int stringnumber, PCRE_UCHAR32 *buffer,
22            int buffersize);
23

DESCRIPTION

25
26       This is a convenience function for extracting a captured substring into
27       a given buffer. The arguments are:
28
29         subject       Subject that has been successfully matched
30         ovector       Offset vector that pcre[16|32]_exec() used
31         stringcount   Value returned by pcre[16|32]_exec()
32         stringnumber  Number of the required substring
33         buffer        Buffer to receive the string
34         buffersize    Size of buffer
35
36       The yield is the length of the string, PCRE_ERROR_NOMEMORY if the  buf‐
37       fer  was  too  small, or PCRE_ERROR_NOSUBSTRING if the string number is
38       invalid.
39
40       There is a complete description of the PCRE native API in  the  pcreapi
41       page and a description of the POSIX API in the pcreposix page.
42
43
44
45PCRE 8.30                        24 June 2012           PCRE_COPY_SUBSTRING(3)
Impressum