74 lines
2.3 KiB
HTML
74 lines
2.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of PCRE2_SUBSTRING_NAMETABLE_SCAN</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>PCRE2_SUBSTRING_NAMETABLE_SCAN</H1>
|
|
Section: C Library Functions (3)<BR>Updated: 03 February 2019<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
PCRE2 - Perl-compatible regular expressions (revised API)
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
<P>
|
|
<B>#include <<A HREF="file:///usr/include/pcre2.h">pcre2.h</A>></B>
|
|
|
|
<P>
|
|
|
|
<PRE>
|
|
<B>int pcre2_substring_nametable_scan(const pcre2_code *</B><I>code</I>,
|
|
<B> PCRE2_SPTR </B><I>name</I>, PCRE2_SPTR *<I>first</I>, PCRE2_SPTR *<I>last</I>);
|
|
</PRE>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
<P>
|
|
This convenience function finds, for a compiled pattern, the first and last
|
|
entries for a given name in the table that translates capture group names into
|
|
numbers.
|
|
<P>
|
|
<BR> <I>code</I> Compiled regular expression
|
|
<BR> <I>name</I> Name whose entries required
|
|
<BR> <I>first</I> Where to return a pointer to the first entry
|
|
<BR> <I>last</I> Where to return a pointer to the last entry
|
|
<P>
|
|
When the name is found in the table, if <I>first</I> 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.
|
|
<P>
|
|
|
|
There is a complete description of the PCRE2 native API, including the format of
|
|
the table entries, in the
|
|
|
|
<B>pcre2api</B>
|
|
|
|
page, and a description of the POSIX API in the
|
|
|
|
<B>pcre2posix</B>
|
|
|
|
page.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:51 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|