80 lines
2.6 KiB
HTML
80 lines
2.6 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of PCRE_COPY_SUBSTRING</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>PCRE_COPY_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"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
PCRE - Perl-compatible regular expressions
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
<P>
|
|
<B>#include <<A HREF="file:///usr/include/pcre.h">pcre.h</A>></B>
|
|
|
|
<P>
|
|
|
|
<PRE>
|
|
<B>int pcre_copy_substring(const char *</B><I>subject</I>, int *<I>ovector</I>,
|
|
<B> int </B><I>stringcount</I>, int <I>stringnumber</I>, char *<I>buffer</I>,
|
|
<B> int </B><I>buffersize</I>);
|
|
|
|
<B>int pcre16_copy_substring(PCRE_SPTR16 </B><I>subject</I>, int *<I>ovector</I>,
|
|
<B> int </B><I>stringcount</I>, int <I>stringnumber</I>, PCRE_UCHAR16 *<I>buffer</I>,
|
|
<B> int </B><I>buffersize</I>);
|
|
|
|
<B>int pcre32_copy_substring(PCRE_SPTR32 </B><I>subject</I>, int *<I>ovector</I>,
|
|
<B> int </B><I>stringcount</I>, int <I>stringnumber</I>, PCRE_UCHAR32 *<I>buffer</I>,
|
|
<B> int </B><I>buffersize</I>);
|
|
</PRE>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
<P>
|
|
This is a convenience function for extracting a captured substring into a given
|
|
buffer. The arguments are:
|
|
<P>
|
|
<BR> <I>subject</I> Subject that has been successfully matched
|
|
<BR> <I>ovector</I> Offset vector that <B>pcre[16|32]_exec()</B> used
|
|
<BR> <I>stringcount</I> Value returned by <B>pcre[16|32]_exec()</B>
|
|
<BR> <I>stringnumber</I> Number of the required substring
|
|
<BR> <I>buffer</I> Buffer to receive the string
|
|
<BR> <I>buffersize</I> Size of buffer
|
|
<P>
|
|
The yield is the length of the string, PCRE_ERROR_NOMEMORY if the buffer was
|
|
too small, or PCRE_ERROR_NOSUBSTRING if the string number 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"> </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>
|