1 |
.TH PCRE 3 |
.TH PCRE_COPY_SUBSTRING 3 |
2 |
.SH NAME |
.SH NAME |
3 |
PCRE - Perl-compatible regular expressions |
PCRE - Perl-compatible regular expressions |
4 |
.SH SYNOPSIS |
.SH SYNOPSIS |
7 |
.B #include <pcre.h> |
.B #include <pcre.h> |
8 |
.PP |
.PP |
9 |
.SM |
.SM |
10 |
.br |
.B int pcre_copy_substring(const char *\fIsubject\fP, int *\fIovector\fP, |
|
.B int pcre_copy_substring(const char *\fIsubject\fR, int *\fIovector\fR, |
|
11 |
.ti +5n |
.ti +5n |
12 |
.B int \fIstringcount\fR, int \fIstringnumber\fR, char *\fIbuffer\fR, |
.B int \fIstringcount\fP, int \fIstringnumber\fP, char *\fIbuffer\fP, |
13 |
.ti +5n |
.ti +5n |
14 |
.B int \fIbuffersize\fR); |
.B int \fIbuffersize\fP); |
15 |
|
. |
16 |
.SH DESCRIPTION |
.SH DESCRIPTION |
17 |
.rs |
.rs |
18 |
.sp |
.sp |
19 |
This is a convenience function for extracting a captured substring into a given |
This is a convenience function for extracting a captured substring into a given |
20 |
buffer. The arguments are: |
buffer. The arguments are: |
21 |
|
.sp |
22 |
\fIsubject\fR Subject that has been successfully matched |
\fIsubject\fP Subject that has been successfully matched |
23 |
\fIovector\fR Offset vector that \fBpcre_exec()\fR used |
\fIovector\fP Offset vector that \fBpcre_exec()\fP used |
24 |
\fIstringcount\fR Value returned by \fBpcre_exec()\fR |
\fIstringcount\fP Value returned by \fBpcre_exec()\fP |
25 |
\fIstringnumber\fR Number of the required substring |
\fIstringnumber\fP Number of the required substring |
26 |
\fIbuffer\fR Buffer to receive the string |
\fIbuffer\fP Buffer to receive the string |
27 |
\fIbuffersize\fR Size of buffer |
\fIbuffersize\fP Size of buffer |
28 |
|
.sp |
29 |
The yield is the legnth of the string, PCRE_ERROR_NOMEMORY if the buffer was |
The yield is the length of the string, PCRE_ERROR_NOMEMORY if the buffer was |
30 |
too small, or PCRE_ERROR_NOSUBSTRING if the string number is invalid. |
too small, or PCRE_ERROR_NOSUBSTRING if the string number is invalid. |
31 |
|
.P |
32 |
There is a complete description of the PCRE API in the |
There is a complete description of the PCRE native API in the |
33 |
|
.\" HREF |
34 |
|
\fBpcreapi\fP |
35 |
|
.\" |
36 |
|
page and a description of the POSIX API in the |
37 |
.\" HREF |
.\" HREF |
38 |
\fBpcreapi\fR |
\fBpcreposix\fP |
39 |
.\" |
.\" |
40 |
page. |
page. |