1PCRE2_DFA_MATCH(3)         Library Functions Manual         PCRE2_DFA_MATCH(3)
2
3
4

NAME

6       PCRE2 - Perl-compatible regular expressions (revised API)
7

SYNOPSIS

9
10       #include <pcre2.h>
11
12       int pcre2_dfa_match(const pcre2_code *code, PCRE2_SPTR subject,
13         PCRE2_SIZE length, PCRE2_SIZE startoffset,
14         uint32_t options, pcre2_match_data *match_data,
15         pcre2_match_context *mcontext,
16         int *workspace, PCRE2_SIZE wscount);
17

DESCRIPTION

19
20       This  function  matches  a  compiled regular expression against a given
21       subject string, using an alternative matching algorithm that scans  the
22       subject  string  just  once  (except  when processing lookaround asser‐
23       tions). This  function  is  not  Perl-compatible  (the  Perl-compatible
24       matching  function  is  pcre2_match()). The arguments for this function
25       are:
26
27         code         Points to the compiled pattern
28         subject      Points to the subject string
29         length       Length of the subject string
30         startoffset  Offset in the subject at which to start matching
31         options      Option bits
32         match_data   Points to a match data block, for results
33         mcontext     Points to a match context, or is NULL
34         workspace    Points to a vector of ints used as working space
35         wscount      Number of elements in the vector
36
37       For pcre2_dfa_match(), a match context is needed only if  you  want  to
38       set up a callout function or specify the heap limit or the match or the
39       recursion depth limits. The length  and  startoffset  values  are  code
40       units, not characters. The options are:
41
42         PCRE2_ANCHORED          Match only at the first position
43         PCRE2_COPY_MATCHED_SUBJECT
44                                 On success, make a private subject copy
45         PCRE2_ENDANCHORED       Pattern can match only at end of subject
46         PCRE2_NOTBOL            Subject is not the beginning of a line
47         PCRE2_NOTEOL            Subject is not the end of a line
48         PCRE2_NOTEMPTY          An empty string is not a valid match
49         PCRE2_NOTEMPTY_ATSTART  An empty string at the start of the subject
50                                  is not a valid match
51         PCRE2_NO_UTF_CHECK      Do not check the subject for UTF
52                                  validity (only relevant if PCRE2_UTF
53                                  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
56         PCRE2_PARTIAL_SOFT      Return PCRE2_ERROR_PARTIAL for a partial
57                                  match if no full matches are found
58         PCRE2_DFA_RESTART       Restart after a partial match
59         PCRE2_DFA_SHORTEST      Return only the shortest match
60
61       There  are restrictions on what may appear in a pattern when using this
62       matching function. Details are given in  the  pcre2matching  documenta‐
63       tion. For details of partial matching, see the pcre2partial page. There
64       is a complete description of the PCRE2 native API in the pcre2api  page
65       and a description of the POSIX API in the pcre2posix page.
66
67
68
69PCRE2 10.33                     16 October 2018             PCRE2_DFA_MATCH(3)
Impressum