Home | History | Annotate | Download | only in html
      1 <html>
      2 <head>
      3 <title>pcre2_dfa_match specification</title>
      4 </head>
      5 <body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
      6 <h1>pcre2_dfa_match man page</h1>
      7 <p>
      8 Return to the <a href="index.html">PCRE2 index page</a>.
      9 </p>
     10 <p>
     11 This page is part of the PCRE2 HTML documentation. It was generated
     12 automatically from the original man page. If there is any nonsense in it,
     13 please consult the man page, in case the conversion went wrong.
     14 <br>
     15 <br><b>
     16 SYNOPSIS
     17 </b><br>
     18 <P>
     19 <b>#include &#60;pcre2.h&#62;</b>
     20 </P>
     21 <P>
     22 <b>int pcre2_dfa_match(const pcre2_code *<i>code</i>, PCRE2_SPTR <i>subject</i>,</b>
     23 <b>  PCRE2_SIZE <i>length</i>, PCRE2_SIZE <i>startoffset</i>,</b>
     24 <b>  uint32_t <i>options</i>, pcre2_match_data *<i>match_data</i>,</b>
     25 <b>  pcre2_match_context *<i>mcontext</i>,</b>
     26 <b>  int *<i>workspace</i>, PCRE2_SIZE <i>wscount</i>);</b>
     27 </P>
     28 <br><b>
     29 DESCRIPTION
     30 </b><br>
     31 <P>
     32 This function matches a compiled regular expression against a given subject
     33 string, using an alternative matching algorithm that scans the subject string
     34 just once (<i>not</i> Perl-compatible). (The Perl-compatible matching function
     35 is <b>pcre2_match()</b>.) The arguments for this function are:
     36 <pre>
     37   <i>code</i>         Points to the compiled pattern
     38   <i>subject</i>      Points to the subject string
     39   <i>length</i>       Length of the subject string
     40   <i>startoffset</i>  Offset in the subject at which to start matching
     41   <i>options</i>      Option bits
     42   <i>match_data</i>   Points to a match data block, for results
     43   <i>mcontext</i>     Points to a match context, or is NULL
     44   <i>workspace</i>    Points to a vector of ints used as working space
     45   <i>wscount</i>      Number of elements in the vector
     46 </pre>
     47 For <b>pcre2_dfa_match()</b>, a match context is needed only if you want to set
     48 up a callout function. The <i>length</i> and <i>startoffset</i> values are code
     49 units, not characters. The options are:
     50 <pre>
     51   PCRE2_ANCHORED          Match only at the first position
     52   PCRE2_NOTBOL            Subject is not the beginning of a line
     53   PCRE2_NOTEOL            Subject is not the end of a line
     54   PCRE2_NOTEMPTY          An empty string is not a valid match
     55   PCRE2_NOTEMPTY_ATSTART  An empty string at the start of the subject
     56                            is not a valid match
     57   PCRE2_NO_UTF_CHECK      Do not check the subject for UTF
     58                            validity (only relevant if PCRE2_UTF
     59                            was set at compile time)
     60   PCRE2_PARTIAL_SOFT      Return PCRE2_ERROR_PARTIAL for a partial
     61                             match if no full matches are found
     62   PCRE2_PARTIAL_HARD      Return PCRE2_ERROR_PARTIAL for a partial match
     63                            even if there is a full match as well
     64   PCRE2_DFA_RESTART       Restart after a partial match
     65   PCRE2_DFA_SHORTEST      Return only the shortest match
     66 </pre>
     67 There are restrictions on what may appear in a pattern when using this matching
     68 function. Details are given in the
     69 <a href="pcre2matching.html"><b>pcre2matching</b></a>
     70 documentation. For details of partial matching, see the
     71 <a href="pcre2partial.html"><b>pcre2partial</b></a>
     72 page. There is a complete description of the PCRE2 native API in the
     73 <a href="pcre2api.html"><b>pcre2api</b></a>
     74 page and a description of the POSIX API in the
     75 <a href="pcre2posix.html"><b>pcre2posix</b></a>
     76 page.
     77 <p>
     78 Return to the <a href="index.html">PCRE2 index page</a>.
     79 </p>
     80