| 1 |
.TH PCRE_DFA_EXEC 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 |
.br
|
| 11 |
.B int pcre_dfa_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
|
| 12 |
.ti +5n
|
| 13 |
.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
|
| 14 |
.ti +5n
|
| 15 |
.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
|
| 16 |
.ti +5n
|
| 17 |
.B int *\fIworkspace\fP, int \fIwscount\fP);
|
| 18 |
.
|
| 19 |
.SH DESCRIPTION
|
| 20 |
.rs
|
| 21 |
.sp
|
| 22 |
This function matches a compiled regular expression against a given subject
|
| 23 |
string, using a DFA matching algorithm (\fInot\fP Perl-compatible). Note that
|
| 24 |
the main, Perl-compatible, matching function is \fBpcre_exec()\fP. The
|
| 25 |
arguments for this function are:
|
| 26 |
.sp
|
| 27 |
\fIcode\fP Points to the compiled pattern
|
| 28 |
\fIextra\fP Points to an associated \fBpcre_extra\fP structure,
|
| 29 |
or is NULL
|
| 30 |
\fIsubject\fP Points to the subject string
|
| 31 |
\fIlength\fP Length of the subject string, in bytes
|
| 32 |
\fIstartoffset\fP Offset in bytes in the subject at which to
|
| 33 |
start matching
|
| 34 |
\fIoptions\fP Option bits
|
| 35 |
\fIovector\fP Points to a vector of ints for result offsets
|
| 36 |
\fIovecsize\fP Number of elements in the vector
|
| 37 |
\fIworkspace\fP Points to a vector of ints used as working space
|
| 38 |
\fIwscount\fP Number of elements in the vector
|
| 39 |
.sp
|
| 40 |
The options are:
|
| 41 |
.sp
|
| 42 |
PCRE_ANCHORED Match only at the first position
|
| 43 |
PCRE_NOTBOL Subject is not the beginning of a line
|
| 44 |
PCRE_NOTEOL Subject is not the end of a line
|
| 45 |
PCRE_NOTEMPTY An empty string is not a valid match
|
| 46 |
PCRE_NO_UTF8_CHECK Do not check the subject for UTF-8
|
| 47 |
validity (only relevant if PCRE_UTF8
|
| 48 |
was set at compile time)
|
| 49 |
PCRE_PARTIAL Return PCRE_ERROR_PARTIAL for a partial match
|
| 50 |
PCRE_DFA_SHORTEST Return only the shortest match
|
| 51 |
PCRE_DFA_RESTART This is a restart after a partial match
|
| 52 |
.sp
|
| 53 |
There are restrictions on what may appear in a pattern when matching using the
|
| 54 |
DFA algorithm is requested. Details are given in the
|
| 55 |
.\" HREF
|
| 56 |
\fBpcrematching\fP
|
| 57 |
.\"
|
| 58 |
documentation.
|
| 59 |
.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 |
\fImatch_limit\fP Limit on internal resource use
|
| 65 |
\fImatch_limit_recursion\fP Limit on internal recursion depth
|
| 66 |
\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 |
PCRE_EXTRA_MATCH_LIMIT_RECURSION, PCRE_EXTRA_CALLOUT_DATA, and
|
| 71 |
PCRE_EXTRA_TABLES. For DFA matching, the \fImatch_limit\fP and
|
| 72 |
\fImatch_limit_recursion\fP fields are not used, and must not be set.
|
| 73 |
.P
|
| 74 |
There is a complete description of the PCRE native API in the
|
| 75 |
.\" HREF
|
| 76 |
\fBpcreapi\fP
|
| 77 |
.\"
|
| 78 |
page and a description of the POSIX API in the
|
| 79 |
.\" HREF
|
| 80 |
\fBpcreposix\fP
|
| 81 |
.\"
|
| 82 |
page.
|