man-pages/man3/pcre_copy_named_substring.3.html
2021-03-31 01:06:50 +01:00

84 lines
3.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of PCRE_COPY_NAMED_SUBSTRING</TITLE>
</HEAD><BODY>
<H1>PCRE_COPY_NAMED_SUBSTRING</H1>
Section: C Library Functions (3)<BR>Updated: 24 June 2012<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
PCRE - Perl-compatible regular expressions
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<P>
<B>#include &lt;<A HREF="file:///usr/include/pcre.h">pcre.h</A>&gt;</B>
<P>
<PRE>
<B>int pcre_copy_named_substring(const pcre *</B><I>code</I>,
<B> const char *</B><I>subject</I>, int *<I>ovector</I>,
<B> int </B><I>stringcount</I>, const char *<I>stringname</I>,
<B> char *</B><I>buffer</I>, int <I>buffersize</I>);
<B>int pcre16_copy_named_substring(const pcre16 *</B><I>code</I>,
<B> PCRE_SPTR16 </B><I>subject</I>, int *<I>ovector</I>,
<B> int </B><I>stringcount</I>, PCRE_SPTR16 <I>stringname</I>,
<B> PCRE_UCHAR16 *</B><I>buffer</I>, int <I>buffersize</I>);
<B>int pcre32_copy_named_substring(const pcre32 *</B><I>code</I>,
<B> PCRE_SPTR32 </B><I>subject</I>, int *<I>ovector</I>,
<B> int </B><I>stringcount</I>, PCRE_SPTR32 <I>stringname</I>,
<B> PCRE_UCHAR32 *</B><I>buffer</I>, int <I>buffersize</I>);
</PRE>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
This is a convenience function for extracting a captured substring, identified
by name, into a given buffer. The arguments are:
<P>
<BR>&nbsp;&nbsp;<I>code</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Pattern&nbsp;that&nbsp;was&nbsp;successfully&nbsp;matched
<BR>&nbsp;&nbsp;<I>subject</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Subject&nbsp;that&nbsp;has&nbsp;been&nbsp;successfully&nbsp;matched
<BR>&nbsp;&nbsp;<I>ovector</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Offset&nbsp;vector&nbsp;that&nbsp;<B>pcre[16|32]_exec()</B>&nbsp;used
<BR>&nbsp;&nbsp;<I>stringcount</I>&nbsp;&nbsp;&nbsp;Value&nbsp;returned&nbsp;by&nbsp;<B>pcre[16|32]_exec()</B>
<BR>&nbsp;&nbsp;<I>stringname</I>&nbsp;&nbsp;&nbsp;&nbsp;Name&nbsp;of&nbsp;the&nbsp;required&nbsp;substring
<BR>&nbsp;&nbsp;<I>buffer</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Buffer&nbsp;to&nbsp;receive&nbsp;the&nbsp;string
<BR>&nbsp;&nbsp;<I>buffersize</I>&nbsp;&nbsp;&nbsp;&nbsp;Size&nbsp;of&nbsp;buffer
<P>
The yield is the length of the substring, PCRE_ERROR_NOMEMORY if the buffer was
too small, or PCRE_ERROR_NOSUBSTRING if the string name is invalid.
<P>
There is a complete description of the PCRE native API in the
<B>pcreapi</B>
page and a description of the POSIX API in the
<B>pcreposix</B>
page.
<P>
<HR>
<A NAME="index">&nbsp;</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>