blob: 4342f9887c9f6480eb0beccc769b7bf2bed7c2d1 [file] [log] [blame]
.TH PCRE2_SUBSTRING_NAMETABLE_SCAN 3 "21 October 2014" "PCRE2 10.00"
PCRE2 - Perl-compatible regular expressions (revised API)
.B #include <pcre2.h>
.B int pcre2_substring_nametable_scan(const pcre2_code *\fIcode\fP,
.B " PCRE2_SPTR \fIname\fP, PCRE2_SPTR *\fIfirst\fP, PCRE2_SPTR *\fIlast\fP);"
This convenience function finds, for a compiled pattern, the first and last
entries for a given name in the table that translates capturing parenthesis
names into numbers.
\fIcode\fP Compiled regular expression
\fIname\fP Name whose entries required
\fIfirst\fP Where to return a pointer to the first entry
\fIlast\fP Where to return a pointer to the last entry
When the name is found in the table, if \fIfirst\fP is NULL, the function
returns a group number, but if there is more than one matching entry, it is not
defined which one. Otherwise, when both pointers have been set, the yield of
the function is the length of each entry in code units. If the name is not
found, PCRE2_ERROR_NOSUBSTRING is returned.
There is a complete description of the PCRE2 native API, including the format of
the table entries, in the
.\" HREF
page, and a description of the POSIX API in the
.\" HREF