1 .TH PCRE2_DFA_MATCH 3 "26 April 2018" "PCRE2 10.32"
3 PCRE2 - Perl-compatible regular expressions (revised API)
10 .B int pcre2_dfa_match(const pcre2_code *\fIcode\fP, PCRE2_SPTR \fIsubject\fP,
11 .B " PCRE2_SIZE \fIlength\fP, PCRE2_SIZE \fIstartoffset\fP,"
12 .B " uint32_t \fIoptions\fP, pcre2_match_data *\fImatch_data\fP,"
13 .B " pcre2_match_context *\fImcontext\fP,"
14 .B " int *\fIworkspace\fP, PCRE2_SIZE \fIwscount\fP);"
20 This function matches a compiled regular expression against a given subject
21 string, using an alternative matching algorithm that scans the subject string
22 just once (except when processing lookaround assertions). This function is
23 \fInot\fP Perl-compatible (the Perl-compatible matching function is
24 \fBpcre2_match()\fP). The arguments for this function are:
26 \fIcode\fP Points to the compiled pattern
27 \fIsubject\fP Points to the subject string
28 \fIlength\fP Length of the subject string
29 \fIstartoffset\fP Offset in the subject at which to start matching
30 \fIoptions\fP Option bits
31 \fImatch_data\fP Points to a match data block, for results
32 \fImcontext\fP Points to a match context, or is NULL
33 \fIworkspace\fP Points to a vector of ints used as working space
34 \fIwscount\fP Number of elements in the vector
36 For \fBpcre2_dfa_match()\fP, a match context is needed only if you want to set
37 up a callout function or specify the heap limit or the match or the recursion
38 depth limits. The \fIlength\fP and \fIstartoffset\fP values are code units, not
39 characters. The options are:
41 PCRE2_ANCHORED Match only at the first position
42 PCRE2_ENDANCHORED Pattern can match only at end of subject
43 PCRE2_NOTBOL Subject is not the beginning of a line
44 PCRE2_NOTEOL Subject is not the end of a line
45 PCRE2_NOTEMPTY An empty string is not a valid match
47 PCRE2_NOTEMPTY_ATSTART An empty string at the start of the subject
50 PCRE2_NO_UTF_CHECK Do not check the subject for UTF
51 validity (only relevant if PCRE2_UTF
52 was set at compile time)
54 PCRE2_PARTIAL_HARD Return PCRE2_ERROR_PARTIAL for a partial
55 match even if there is a full match
57 PCRE2_PARTIAL_SOFT Return PCRE2_ERROR_PARTIAL for a partial
58 match if no full matches are found
59 PCRE2_DFA_RESTART Restart after a partial match
60 PCRE2_DFA_SHORTEST Return only the shortest match
62 There are restrictions on what may appear in a pattern when using this matching
63 function. Details are given in the
67 documentation. For details of partial matching, see the
71 page. There is a complete description of the PCRE2 native API in the
75 page and a description of the POSIX API in the