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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1328 - (show annotations) (download)
Sun May 12 16:28:22 2013 UTC (13 days ago) by ph10
File size: 5328 byte(s)
Documentation clarification for 16/32 bit libraries.

1 .TH PCRE_DFA_EXEC 3 "12 May 2013" "PCRE 8.33"
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_dfa_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
11 .ti +5n
12 .B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
13 .ti +5n
14 .B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
15 .ti +5n
16 .B int *\fIworkspace\fP, int \fIwscount\fP);
17 .PP
18 .B int pcre16_dfa_exec(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
19 .ti +5n
20 .B "PCRE_SPTR16 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
21 .ti +5n
22 .B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
23 .ti +5n
24 .B int *\fIworkspace\fP, int \fIwscount\fP);
25 .PP
26 .B int pcre32_dfa_exec(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP,"
27 .ti +5n
28 .B "PCRE_SPTR32 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
29 .ti +5n
30 .B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
31 .ti +5n
32 .B int *\fIworkspace\fP, int \fIwscount\fP);
33 .
34 .SH DESCRIPTION
35 .rs
36 .sp
37 This function matches a compiled regular expression against a given subject
38 string, using an alternative matching algorithm that scans the subject string
39 just once (\fInot\fP Perl-compatible). Note that the main, Perl-compatible,
40 matching function is \fBpcre[16|32]_exec()\fP. The arguments for this function
41 are:
42 .sp
43 \fIcode\fP Points to the compiled pattern
44 \fIextra\fP Points to an associated \fBpcre[16|32]_extra\fP structure,
45 or is NULL
46 \fIsubject\fP Points to the subject string
47 \fIlength\fP Length of the subject string
48 \fIstartoffset\fP Offset in the subject at which to start matching
49 \fIoptions\fP Option bits
50 \fIovector\fP Points to a vector of ints for result offsets
51 \fIovecsize\fP Number of elements in the vector
52 \fIworkspace\fP Points to a vector of ints used as working space
53 \fIwscount\fP Number of elements in the vector
54 .sp
55 The units for \fIlength\fP and \fIstartoffset\fP are bytes for
56 \fBpcre_exec()\fP, 16-bit data items for \fBpcre16_exec()\fP, and 32-bit items
57 for \fBpcre32_exec()\fP. The options are:
58 .sp
59 PCRE_ANCHORED Match only at the first position
60 PCRE_BSR_ANYCRLF \eR matches only CR, LF, or CRLF
61 PCRE_BSR_UNICODE \eR matches all Unicode line endings
62 PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
63 PCRE_NEWLINE_ANYCRLF Recognize CR, LF, & CRLF as newline sequences
64 PCRE_NEWLINE_CR Recognize CR as the only newline sequence
65 PCRE_NEWLINE_CRLF Recognize CRLF as the only newline sequence
66 PCRE_NEWLINE_LF Recognize LF as the only newline sequence
67 PCRE_NOTBOL Subject is not the beginning of a line
68 PCRE_NOTEOL Subject is not the end of a line
69 PCRE_NOTEMPTY An empty string is not a valid match
70 PCRE_NOTEMPTY_ATSTART An empty string at the start of the subject
71 is not a valid match
72 PCRE_NO_START_OPTIMIZE Do not do "start-match" optimizations
73 PCRE_NO_UTF16_CHECK Do not check the subject for UTF-16
74 validity (only relevant if PCRE_UTF16
75 was set at compile time)
76 PCRE_NO_UTF32_CHECK Do not check the subject for UTF-32
77 validity (only relevant if PCRE_UTF32
78 was set at compile time)
79 PCRE_NO_UTF8_CHECK Do not check the subject for UTF-8
80 validity (only relevant if PCRE_UTF8
81 was set at compile time)
82 PCRE_PARTIAL ) Return PCRE_ERROR_PARTIAL for a partial
83 PCRE_PARTIAL_SOFT ) match if no full matches are found
84 PCRE_PARTIAL_HARD Return PCRE_ERROR_PARTIAL for a partial match
85 even if there is a full match as well
86 PCRE_DFA_SHORTEST Return only the shortest match
87 PCRE_DFA_RESTART Restart after a partial match
88 .sp
89 There are restrictions on what may appear in a pattern when using this matching
90 function. Details are given in the
91 .\" HREF
92 \fBpcrematching\fP
93 .\"
94 documentation. For details of partial matching, see the
95 .\" HREF
96 \fBpcrepartial\fP
97 .\"
98 page.
99 .P
100 A \fBpcre[16|32]_extra\fP structure contains the following fields:
101 .sp
102 \fIflags\fP Bits indicating which fields are set
103 \fIstudy_data\fP Opaque data from \fBpcre[16|32]_study()\fP
104 \fImatch_limit\fP Limit on internal resource use
105 \fImatch_limit_recursion\fP Limit on internal recursion depth
106 \fIcallout_data\fP Opaque data passed back to callouts
107 \fItables\fP Points to character tables or is NULL
108 \fImark\fP For passing back a *MARK pointer
109 \fIexecutable_jit\fP Opaque data from JIT compilation
110 .sp
111 The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT,
112 PCRE_EXTRA_MATCH_LIMIT_RECURSION, PCRE_EXTRA_CALLOUT_DATA,
113 PCRE_EXTRA_TABLES, PCRE_EXTRA_MARK and PCRE_EXTRA_EXECUTABLE_JIT. For this
114 matching function, the \fImatch_limit\fP and \fImatch_limit_recursion\fP fields
115 are not used, and must not be set. The PCRE_EXTRA_EXECUTABLE_JIT flag and
116 the corresponding variable are ignored.
117 .P
118 There is a complete description of the PCRE native API in the
119 .\" HREF
120 \fBpcreapi\fP
121 .\"
122 page and a description of the POSIX API in the
123 .\" HREF
124 \fBpcreposix\fP
125 .\"
126 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