/[pcre]/code/trunk/doc/pcre_exec.3
ViewVC logotype

Contents of /code/trunk/doc/pcre_exec.3

Parent Directory Parent Directory | Revision Log Revision Log


Revision 392 - (hide annotations) (download)
Tue Mar 17 21:30:30 2009 UTC (5 years, 6 months ago) by ph10
File size: 2946 byte(s)
Update after detrailing for a test release.

1 nigel 79 .TH PCRE_EXEC 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 nigel 75 .B int pcre_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
11 nigel 63 .ti +5n
12 nigel 75 .B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
13 nigel 63 .ti +5n
14 nigel 75 .B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);
15     .
16 nigel 63 .SH DESCRIPTION
17     .rs
18     .sp
19     This function matches a compiled regular expression against a given subject
20 nigel 77 string, using a matching algorithm that is similar to Perl's. It returns
21     offsets to captured substrings. Its arguments are:
22 nigel 75 .sp
23     \fIcode\fP Points to the compiled pattern
24     \fIextra\fP Points to an associated \fBpcre_extra\fP structure,
25 nigel 63 or is NULL
26 nigel 75 \fIsubject\fP Points to the subject string
27     \fIlength\fP Length of the subject string, in bytes
28     \fIstartoffset\fP Offset in bytes in the subject at which to
29 nigel 63 start matching
30 nigel 75 \fIoptions\fP Option bits
31     \fIovector\fP Points to a vector of ints for result offsets
32     \fIovecsize\fP Number of elements in the vector (a multiple of 3)
33     .sp
34 nigel 63 The options are:
35 nigel 75 .sp
36 nigel 63 PCRE_ANCHORED Match only at the first position
37 ph10 231 PCRE_BSR_ANYCRLF \eR matches only CR, LF, or CRLF
38     PCRE_BSR_UNICODE \eR matches all Unicode line endings
39 nigel 93 PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
40 ph10 150 PCRE_NEWLINE_ANYCRLF Recognize CR, LF, and CRLF as newline sequences
41 nigel 91 PCRE_NEWLINE_CR Set CR as the newline sequence
42     PCRE_NEWLINE_CRLF Set CRLF as the newline sequence
43     PCRE_NEWLINE_LF Set LF as the newline sequence
44 nigel 63 PCRE_NOTBOL Subject is not the beginning of a line
45     PCRE_NOTEOL Subject is not the end of a line
46     PCRE_NOTEMPTY An empty string is not a valid match
47 ph10 392 PCRE_NO_START_OPTIMIZE Do not do "start-match" optimizations
48 nigel 71 PCRE_NO_UTF8_CHECK Do not check the subject for UTF-8
49     validity (only relevant if PCRE_UTF8
50     was set at compile time)
51 nigel 75 PCRE_PARTIAL Return PCRE_ERROR_PARTIAL for a partial match
52     .sp
53     There are restrictions on what may appear in a pattern when partial matching is
54 nigel 93 requested. For details, see the
55     .\" HREF
56     \fBpcrepartial\fP
57     .\"
58     page.
59 nigel 75 .P
60     A \fBpcre_extra\fP structure contains the following fields:
61     .sp
62     \fIflags\fP Bits indicating which fields are set
63     \fIstudy_data\fP Opaque data from \fBpcre_study()\fP
64 nigel 87 \fImatch_limit\fP Limit on internal resource use
65     \fImatch_limit_recursion\fP Limit on internal recursion depth
66 nigel 75 \fIcallout_data\fP Opaque data passed back to callouts
67     \fItables\fP Points to character tables or is NULL
68     .sp
69     The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT,
70 nigel 87 PCRE_EXTRA_MATCH_LIMIT_RECURSION, PCRE_EXTRA_CALLOUT_DATA, and
71     PCRE_EXTRA_TABLES.
72 nigel 75 .P
73     There is a complete description of the PCRE native API in the
74 nigel 63 .\" HREF
75 nigel 75 \fBpcreapi\fP
76 nigel 63 .\"
77 nigel 75 page and a description of the POSIX API in the
78     .\" HREF
79     \fBpcreposix\fP
80     .\"
81 nigel 63 page.

Properties

Name Value
svn:eol-style native
svn:keywords "Author Date Id Revision Url"

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12