1<html>
2<head>
3<title>pcre_copy_substring specification</title>
4</head>
5<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
6<h1>pcre_copy_substring man page</h1>
7<p>
8Return to the <a href="index.html">PCRE index page</a>.
9</p>
10<p>
11This page is part of the PCRE HTML documentation. It was generated automatically
12from the original man page. If there is any nonsense in it, please consult the
13man page, in case the conversion went wrong.
14<br>
15<br><b>
16SYNOPSIS
17</b><br>
18<P>
19<b>#include &#60;pcre.h&#62;</b>
20</P>
21<P>
22<b>int pcre_copy_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b>
23<b>int <i>stringcount</i>, int <i>stringnumber</i>, char *<i>buffer</i>,</b>
24<b>int <i>buffersize</i>);</b>
25</P>
26<br><b>
27DESCRIPTION
28</b><br>
29<P>
30This is a convenience function for extracting a captured substring into a given
31buffer. The arguments are:
32<pre>
33  <i>subject</i>       Subject that has been successfully matched
34  <i>ovector</i>       Offset vector that <b>pcre_exec()</b> used
35  <i>stringcount</i>   Value returned by <b>pcre_exec()</b>
36  <i>stringnumber</i>  Number of the required substring
37  <i>buffer</i>        Buffer to receive the string
38  <i>buffersize</i>    Size of buffer
39</pre>
40The yield is the length of the string, PCRE_ERROR_NOMEMORY if the buffer was
41too small, or PCRE_ERROR_NOSUBSTRING if the string number is invalid.
42</P>
43<P>
44There is a complete description of the PCRE native API in the
45<a href="pcreapi.html"><b>pcreapi</b></a>
46page and a description of the POSIX API in the
47<a href="pcreposix.html"><b>pcreposix</b></a>
48page.
49<p>
50Return to the <a href="index.html">PCRE index page</a>.
51</p>
52