Annotation of embedaddon/pcre/doc/pcre_get_substring.3, revision 1.1.1.1
1.1 misho 1: .TH PCRE_GET_SUBSTRING 3
2: .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: .B int pcre_get_substring(const char *\fIsubject\fP, int *\fIovector\fP,
11: .ti +5n
12: .B int \fIstringcount\fP, int \fIstringnumber\fP,
13: .ti +5n
14: .B const char **\fIstringptr\fP);
15: .
16: .SH DESCRIPTION
17: .rs
18: .sp
19: This is a convenience function for extracting a captured substring. The
20: arguments are:
21: .sp
22: \fIsubject\fP Subject that has been successfully matched
23: \fIovector\fP Offset vector that \fBpcre_exec()\fP used
24: \fIstringcount\fP Value returned by \fBpcre_exec()\fP
25: \fIstringnumber\fP Number of the required substring
26: \fIstringptr\fP Where to put the string pointer
27: .sp
28: The memory in which the substring is placed is obtained by calling
29: \fBpcre_malloc()\fP. The convenience function \fBpcre_free_substring()\fP can
30: be used to free it when it is no longer needed. The yield of the function is
31: the length of the substring, PCRE_ERROR_NOMEMORY if sufficient memory could not
32: be obtained, or PCRE_ERROR_NOSUBSTRING if the string number is invalid.
33: .P
34: There is a complete description of the PCRE native API in the
35: .\" HREF
36: \fBpcreapi\fP
37: .\"
38: page and a description of the POSIX API in the
39: .\" HREF
40: \fBpcreposix\fP
41: .\"
42: page.
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>