| 1 |
nigel |
63 |
<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 |
nigel |
75 |
<h1>pcre_copy_substring man page</h1> |
| 7 |
|
|
<p> |
| 8 |
|
|
Return to the <a href="index.html">PCRE index page</a>. |
| 9 |
|
|
</p> |
| 10 |
ph10 |
111 |
<p> |
| 11 |
nigel |
75 |
This page is part of the PCRE HTML documentation. It was generated automatically |
| 12 |
|
|
from the original man page. If there is any nonsense in it, please consult the |
| 13 |
|
|
man page, in case the conversion went wrong. |
| 14 |
ph10 |
111 |
<br> |
| 15 |
nigel |
63 |
<br><b> |
| 16 |
|
|
SYNOPSIS |
| 17 |
|
|
</b><br> |
| 18 |
|
|
<P> |
| 19 |
|
|
<b>#include <pcre.h></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 |
ph10 |
869 |
<P> |
| 27 |
|
|
<b>int pcre16_copy_substring(PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b> |
| 28 |
|
|
<b>int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR16 *<i>buffer</i>,</b> |
| 29 |
|
|
<b>int <i>buffersize</i>);</b> |
| 30 |
|
|
</P> |
| 31 |
ph10 |
1194 |
<P> |
| 32 |
|
|
<b>int pcre32_copy_substring(PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b> |
| 33 |
|
|
<b>int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR32 *<i>buffer</i>,</b> |
| 34 |
|
|
<b>int <i>buffersize</i>);</b> |
| 35 |
|
|
</P> |
| 36 |
nigel |
63 |
<br><b> |
| 37 |
|
|
DESCRIPTION |
| 38 |
|
|
</b><br> |
| 39 |
|
|
<P> |
| 40 |
|
|
This is a convenience function for extracting a captured substring into a given |
| 41 |
|
|
buffer. The arguments are: |
| 42 |
|
|
<pre> |
| 43 |
|
|
<i>subject</i> Subject that has been successfully matched |
| 44 |
ph10 |
1194 |
<i>ovector</i> Offset vector that <b>pcre[16|32]_exec()</b> used |
| 45 |
|
|
<i>stringcount</i> Value returned by <b>pcre[16|32]_exec()</b> |
| 46 |
nigel |
63 |
<i>stringnumber</i> Number of the required substring |
| 47 |
|
|
<i>buffer</i> Buffer to receive the string |
| 48 |
|
|
<i>buffersize</i> Size of buffer |
| 49 |
nigel |
75 |
</pre> |
| 50 |
nigel |
93 |
The yield is the length of the string, PCRE_ERROR_NOMEMORY if the buffer was |
| 51 |
nigel |
63 |
too small, or PCRE_ERROR_NOSUBSTRING if the string number is invalid. |
| 52 |
|
|
</P> |
| 53 |
|
|
<P> |
| 54 |
nigel |
75 |
There is a complete description of the PCRE native API in the |
| 55 |
nigel |
63 |
<a href="pcreapi.html"><b>pcreapi</b></a> |
| 56 |
nigel |
75 |
page and a description of the POSIX API in the |
| 57 |
|
|
<a href="pcreposix.html"><b>pcreposix</b></a> |
| 58 |
nigel |
63 |
page. |
| 59 |
nigel |
75 |
<p> |
| 60 |
|
|
Return to the <a href="index.html">PCRE index page</a>. |
| 61 |
|
|
</p> |