1PCRE2_SUBSTRING_COPY_BYNAME(L3i)brary Functions ManuPaClRE2_SUBSTRING_COPY_BYNAME(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_byname(pcre2_match_data *match_data,
13         PCRE2_SPTR name, PCRE2_UCHAR *buffer, PCRE2_SIZE *bufflen);
14

DESCRIPTION

16
17       This  is  a  convenience  function for extracting a captured substring,
18       identified by name, into a given buffer. The arguments are:
19
20         match_data    The match data block for the match
21         name          Name of the required substring
22         buffer        Buffer to receive the string
23         bufflen       Length of buffer (code units)
24
25       The bufflen variable is updated to contain the length of the  extracted
26       string,  excluding the trailing zero. The yield of the function is zero
27       for success or one of the following error numbers:
28
29         PCRE2_ERROR_NOSUBSTRING   there are no groups of that name
30         PCRE2_ERROR_UNAVAILBLE    the ovector was too small for that group
31         PCRE2_ERROR_UNSET         the group did not participate in the match
32         PCRE2_ERROR_NOMEMORY      the buffer is not big enough
33
34       If there is more than one group with the given name, the first one that
35       is  set  is returned. In this situation PCRE2_ERROR_UNSET means that no
36       group with the given name was set.
37
38       There is a complete description of the PCRE2 native API in the pcre2api
39       page and a description of the POSIX API in the pcre2posix page.
40
41
42
43PCRE2 10.00                     21 October 2014 PCRE2_SUBSTRING_COPY_BYNAME(3)
Impressum