1PCRE2_SUBSTRING_COPY_BYNUMBELRi(b3r)ary Functions MaPnCuRaEl2_SUBSTRING_COPY_BYNUMBER(3)
2
3
4

NAME

6       PCRE2 - Perl-compatible regular expressions (revised API)
7

SYNOPSIS

9
10       #include <pcre2.h>
11
12       int pcre2_substring_copy_bynumber(pcre2_match_data *match_data,
13         uint32_t number, PCRE2_UCHAR *buffer,
14         PCRE2_SIZE *bufflen);
15

DESCRIPTION

17
18       This is a convenience function for extracting a captured substring into
19       a given buffer. The arguments are:
20
21         match_data    The match data block for the match
22         number        Number of the required substring
23         buffer        Buffer to receive the string
24         bufflen       Length of buffer
25
26       The bufflen variable is  updated  with  the  length  of  the  extracted
27       string,  excluding  the  terminating zero. The yield of the function is
28       zero for success or one of the following error numbers:
29
30         PCRE2_ERROR_NOSUBSTRING   there are no groups of that number
31         PCRE2_ERROR_UNAVAILBLE    the ovector was too small for that group
32         PCRE2_ERROR_UNSET         the group did not participate in the match
33         PCRE2_ERROR_NOMEMORY      the buffer is too small
34
35
36       There is a complete description of the PCRE2 native API in the pcre2api
37       page and a description of the POSIX API in the pcre2posix page.
38
39
40
41PCRE2 10.00                    13 December 2014PCRE2_SUBSTRING_COPY_BYNUMBER(3)
Impressum