| 1 |
nigel |
79 |
.TH PCRE_GET_SUBSTRING_LIST 3 |
| 2 |
nigel |
63 |
.SH NAME |
| 3 |
|
|
PCRE - Perl-compatible regular expressions |
| 4 |
|
|
.SH SYNOPSIS |
| 5 |
|
|
.rs |
| 6 |
|
|
.sp |
| 7 |
|
|
.B #include <pcre.h> |
| 8 |
|
|
.PP |
| 9 |
|
|
.SM |
| 10 |
|
|
.br |
| 11 |
nigel |
75 |
.B int pcre_get_substring_list(const char *\fIsubject\fP, |
| 12 |
nigel |
63 |
.ti +5n |
| 13 |
nigel |
75 |
.B int *\fIovector\fP, int \fIstringcount\fP, "const char ***\fIlistptr\fP);" |
| 14 |
|
|
. |
| 15 |
nigel |
63 |
.SH DESCRIPTION |
| 16 |
|
|
.rs |
| 17 |
|
|
.sp |
| 18 |
|
|
This is a convenience function for extracting a list of all the captured |
| 19 |
|
|
substrings. The arguments are: |
| 20 |
nigel |
75 |
.sp |
| 21 |
|
|
\fIsubject\fP Subject that has been successfully matched |
| 22 |
|
|
\fIovector\fP Offset vector that \fBpcre_exec\fP used |
| 23 |
|
|
\fIstringcount\fP Value returned by \fBpcre_exec\fP |
| 24 |
|
|
\fIlistptr\fP Where to put a pointer to the list |
| 25 |
|
|
.sp |
| 26 |
|
|
The memory in which the substrings and the list are placed is obtained by |
| 27 |
nigel |
93 |
calling \fBpcre_malloc()\fP. The convenience function |
| 28 |
|
|
\fBpcre_free_substring_list()\fP can be used to free it when it is no longer |
| 29 |
|
|
needed. A pointer to a list of pointers is put in the variable whose address is |
| 30 |
|
|
in \fIlistptr\fP. The list is terminated by a NULL pointer. The yield of the |
| 31 |
|
|
function is zero on success or PCRE_ERROR_NOMEMORY if sufficient memory could |
| 32 |
|
|
not be obtained. |
| 33 |
nigel |
75 |
.P |
| 34 |
|
|
There is a complete description of the PCRE native API in the |
| 35 |
nigel |
63 |
.\" HREF |
| 36 |
nigel |
75 |
\fBpcreapi\fP |
| 37 |
nigel |
63 |
.\" |
| 38 |
nigel |
75 |
page and a description of the POSIX API in the |
| 39 |
|
|
.\" HREF |
| 40 |
|
|
\fBpcreposix\fP |
| 41 |
|
|
.\" |
| 42 |
nigel |
63 |
page. |