chiark / gitweb /
Merge from existing archive branch
[pcre3.git] / doc / pcre_get_stringtable_entries.3
1 .TH PCRE_GET_STRINGTABLE_ENTRIES 3 "24 June 2012" "PCRE 8.30"
2 .SH NAME
3 PCRE - Perl-compatible regular expressions
4 .SH SYNOPSIS
5 .rs
6 .sp
7 .B #include <pcre.h>
8 .PP
9 .nf
10 .B int pcre_get_stringtable_entries(const pcre *\fIcode\fP,
11 .B "     const char *\fIname\fP, char **\fIfirst\fP, char **\fIlast\fP);"
12 .sp
13 .B int pcre16_get_stringtable_entries(const pcre16 *\fIcode\fP,
14 .B "     PCRE_SPTR16 \fIname\fP, PCRE_UCHAR16 **\fIfirst\fP, PCRE_UCHAR16 **\fIlast\fP);"
15 .sp
16 .B int pcre32_get_stringtable_entries(const pcre32 *\fIcode\fP,
17 .B "     PCRE_SPTR32 \fIname\fP, PCRE_UCHAR32 **\fIfirst\fP, PCRE_UCHAR32 **\fIlast\fP);"
18 .fi
19 .
20 .SH DESCRIPTION
21 .rs
22 .sp
23 This convenience function finds, for a compiled pattern, the first and last
24 entries for a given name in the table that translates capturing parenthesis
25 names into numbers. When names are required to be unique (PCRE_DUPNAMES is
26 \fInot\fP set), it is usually easier to use \fBpcre[16|32]_get_stringnumber()\fP
27 instead.
28 .sp
29   \fIcode\fP    Compiled regular expression
30   \fIname\fP    Name whose entries required
31   \fIfirst\fP   Where to return a pointer to the first entry
32   \fIlast\fP    Where to return a pointer to the last entry
33 .sp
34 The yield of the function is the length of each entry, or
35 PCRE_ERROR_NOSUBSTRING if none are found.
36 .P
37 There is a complete description of the PCRE native API, including the format of
38 the table entries, in the
39 .\" HREF
40 \fBpcreapi\fP
41 .\"
42 page, and a description of the POSIX API in the
43 .\" HREF
44 \fBpcreposix\fP
45 .\"
46 page.