1PCRE_COPY_NAMED_SUBSTRING(3)Library Functions ManualPCRE_COPY_NAMED_SUBSTRING(3)
2
3
4
6 PCRE - Perl-compatible regular expressions
7
9
10 #include <pcre.h>
11
12 int pcre_copy_named_substring(const pcre *code,
13 const char *subject, int *ovector,
14 int stringcount, const char *stringname,
15 char *buffer, int buffersize);
16
18
19 This is a convenience function for extracting a captured substring,
20 identified by name, into a given buffer. The arguments are:
21
22 code Pattern that was successfully matched
23 subject Subject that has been successfully matched
24 ovector Offset vector that pcre_exec() used
25 stringcount Value returned by pcre_exec()
26 stringname Name of the required substring
27 buffer Buffer to receive the string
28 buffersize Size of buffer
29
30 The yield is the length of the substring, PCRE_ERROR_NOMEMORY if the
31 buffer was too small, or PCRE_ERROR_NOSUBSTRING if the string name is
32 invalid.
33
34 There is a complete description of the PCRE native API in the pcreapi
35 page and a description of the POSIX API in the pcreposix page.
36
37
38
39 PCRE_COPY_NAMED_SUBSTRING(3)