/[pcre]/code/trunk/doc/html/pcreapi.html
ViewVC logotype

Diff of /code/trunk/doc/html/pcreapi.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 345 by ph10, Mon Apr 28 15:10:02 2008 UTC revision 453 by ph10, Fri Sep 18 19:12:35 2009 UTC
# Line 164  Applications can use these to include su Line 164  Applications can use these to include su
164  The functions <b>pcre_compile()</b>, <b>pcre_compile2()</b>, <b>pcre_study()</b>,  The functions <b>pcre_compile()</b>, <b>pcre_compile2()</b>, <b>pcre_study()</b>,
165  and <b>pcre_exec()</b> are used for compiling and matching regular expressions  and <b>pcre_exec()</b> are used for compiling and matching regular expressions
166  in a Perl-compatible manner. A sample program that demonstrates the simplest  in a Perl-compatible manner. A sample program that demonstrates the simplest
167  way of using them is provided in the file called <i>pcredemo.c</i> in the source  way of using them is provided in the file called <i>pcredemo.c</i> in the PCRE
168  distribution. The  source distribution. A listing of this program is given in the
169    <a href="pcredemo.html"><b>pcredemo</b></a>
170    documentation, and the
171  <a href="pcresample.html"><b>pcresample</b></a>  <a href="pcresample.html"><b>pcresample</b></a>
172  documentation describes how to compile and run it.  documentation describes how to compile and run it.
173  </P>  </P>
# Line 173  documentation describes how to compile a Line 175  documentation describes how to compile a
175  A second matching function, <b>pcre_dfa_exec()</b>, which is not  A second matching function, <b>pcre_dfa_exec()</b>, which is not
176  Perl-compatible, is also provided. This uses a different algorithm for the  Perl-compatible, is also provided. This uses a different algorithm for the
177  matching. The alternative algorithm finds all possible matches (at a given  matching. The alternative algorithm finds all possible matches (at a given
178  point in the subject), and scans the subject just once. However, this algorithm  point in the subject), and scans the subject just once (unless there are
179  does not return captured substrings. A description of the two matching  lookbehind assertions). However, this algorithm does not return captured
180  algorithms and their advantages and disadvantages is given in the  substrings. A description of the two matching algorithms and their advantages
181    and disadvantages is given in the
182  <a href="pcrematching.html"><b>pcrematching</b></a>  <a href="pcrematching.html"><b>pcrematching</b></a>
183  documentation.  documentation.
184  </P>  </P>
# Line 333  properties is available; otherwise it is Line 336  properties is available; otherwise it is
336  </pre>  </pre>
337  The output is an integer whose value specifies the default character sequence  The output is an integer whose value specifies the default character sequence
338  that is recognized as meaning "newline". The four values that are supported  that is recognized as meaning "newline". The four values that are supported
339  are: 10 for LF, 13 for CR, 3338 for CRLF, -2 for ANYCRLF, and -1 for ANY. The  are: 10 for LF, 13 for CR, 3338 for CRLF, -2 for ANYCRLF, and -1 for ANY.
340  default should normally be the standard sequence for your operating system.  Though they are derived from ASCII, the same values are returned in EBCDIC
341    environments. The default should normally correspond to the standard sequence
342    for your operating system.
343  <pre>  <pre>
344    PCRE_CONFIG_BSR    PCRE_CONFIG_BSR
345  </pre>  </pre>
# Line 361  documentation. Line 366  documentation.
366  <pre>  <pre>
367    PCRE_CONFIG_MATCH_LIMIT    PCRE_CONFIG_MATCH_LIMIT
368  </pre>  </pre>
369  The output is an integer that gives the default limit for the number of  The output is a long integer that gives the default limit for the number of
370  internal matching function calls in a <b>pcre_exec()</b> execution. Further  internal matching function calls in a <b>pcre_exec()</b> execution. Further
371  details are given with <b>pcre_exec()</b> below.  details are given with <b>pcre_exec()</b> below.
372  <pre>  <pre>
373    PCRE_CONFIG_MATCH_LIMIT_RECURSION    PCRE_CONFIG_MATCH_LIMIT_RECURSION
374  </pre>  </pre>
375  The output is an integer that gives the default limit for the depth of  The output is a long integer that gives the default limit for the depth of
376  recursion when calling the internal matching function in a <b>pcre_exec()</b>  recursion when calling the internal matching function in a <b>pcre_exec()</b>
377  execution. Further details are given with <b>pcre_exec()</b> below.  execution. Further details are given with <b>pcre_exec()</b> below.
378  <pre>  <pre>
# Line 414  argument, which is an address (see below Line 419  argument, which is an address (see below
419  <P>  <P>
420  The <i>options</i> argument contains various bit settings that affect the  The <i>options</i> argument contains various bit settings that affect the
421  compilation. It should be zero if no options are required. The available  compilation. It should be zero if no options are required. The available
422  options are described below. Some of them, in particular, those that are  options are described below. Some of them (in particular, those that are
423  compatible with Perl, can also be set and unset from within the pattern (see  compatible with Perl, but also some others) can also be set and unset from
424  the detailed description in the  within the pattern (see the detailed description in the
425  <a href="pcrepattern.html"><b>pcrepattern</b></a>  <a href="pcrepattern.html"><b>pcrepattern</b></a>
426  documentation). For these options, the contents of the <i>options</i> argument  documentation). For those options that can be different in different parts of
427  specifies their initial settings at the start of compilation and execution. The  the pattern, the contents of the <i>options</i> argument specifies their initial
428  PCRE_ANCHORED and PCRE_NEWLINE_<i>xxx</i> options can be set at the time of  settings at the start of compilation and execution. The PCRE_ANCHORED and
429  matching as well as at compile time.  PCRE_NEWLINE_<i>xxx</i> options can be set at the time of matching as well as at
430    compile time.
431  </P>  </P>
432  <P>  <P>
433  If <i>errptr</i> is NULL, <b>pcre_compile()</b> returns NULL immediately.  If <i>errptr</i> is NULL, <b>pcre_compile()</b> returns NULL immediately.
# Line 1012  different for each compiled pattern. Line 1018  different for each compiled pattern.
1018  <pre>  <pre>
1019    PCRE_INFO_OKPARTIAL    PCRE_INFO_OKPARTIAL
1020  </pre>  </pre>
1021  Return 1 if the pattern can be used for partial matching, otherwise 0. The  Return 1 if the pattern can be used for partial matching with
1022  fourth argument should point to an <b>int</b> variable. The  <b>pcre_exec()</b>, otherwise 0. The fourth argument should point to an
1023    <b>int</b> variable. From release 8.00, this always returns 1, because the
1024    restrictions that previously applied to partial matching have been lifted. The
1025  <a href="pcrepartial.html"><b>pcrepartial</b></a>  <a href="pcrepartial.html"><b>pcrepartial</b></a>
1026  documentation lists the restrictions that apply to patterns when partial  documentation gives details of partial matching.
 matching is used.  
1027  <pre>  <pre>
1028    PCRE_INFO_OPTIONS    PCRE_INFO_OPTIONS
1029  </pre>  </pre>
# Line 1218  PCRE_EXTRA_MATCH_LIMIT_RECURSION is set Line 1225  PCRE_EXTRA_MATCH_LIMIT_RECURSION is set
1225  is exceeded, <b>pcre_exec()</b> returns PCRE_ERROR_RECURSIONLIMIT.  is exceeded, <b>pcre_exec()</b> returns PCRE_ERROR_RECURSIONLIMIT.
1226  </P>  </P>
1227  <P>  <P>
1228  The <i>pcre_callout</i> field is used in conjunction with the "callout" feature,  The <i>callout_data</i> field is used in conjunction with the "callout" feature,
1229  which is described in the  and is described in the
1230  <a href="pcrecallout.html"><b>pcrecallout</b></a>  <a href="pcrecallout.html"><b>pcrecallout</b></a>
1231  documentation.  documentation.
1232  </P>  </P>
# Line 1242  Option bits for <b>pcre_exec()</b> Line 1249  Option bits for <b>pcre_exec()</b>
1249  <P>  <P>
1250  The unused bits of the <i>options</i> argument for <b>pcre_exec()</b> must be  The unused bits of the <i>options</i> argument for <b>pcre_exec()</b> must be
1251  zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_<i>xxx</i>,  zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_<i>xxx</i>,
1252  PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NO_UTF8_CHECK and PCRE_PARTIAL.  PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART,
1253    PCRE_NO_START_OPTIMIZE, PCRE_NO_UTF8_CHECK, PCRE_PARTIAL_SOFT, and
1254    PCRE_PARTIAL_HARD.
1255  <pre>  <pre>
1256    PCRE_ANCHORED    PCRE_ANCHORED
1257  </pre>  </pre>
# Line 1321  match the empty string, the entire match Line 1330  match the empty string, the entire match
1330  <pre>  <pre>
1331    a?b?    a?b?
1332  </pre>  </pre>
1333  is applied to a string not beginning with "a" or "b", it matches the empty  is applied to a string not beginning with "a" or "b", it matches an empty
1334  string at the start of the subject. With PCRE_NOTEMPTY set, this match is not  string at the start of the subject. With PCRE_NOTEMPTY set, this match is not
1335  valid, so PCRE searches further into the string for occurrences of "a" or "b".  valid, so PCRE searches further into the string for occurrences of "a" or "b".
1336    <pre>
1337      PCRE_NOTEMPTY_ATSTART
1338    </pre>
1339    This is like PCRE_NOTEMPTY, except that an empty string match that is not at
1340    the start of the subject is permitted. If the pattern is anchored, such a match
1341    can occur only if the pattern contains \K.
1342  </P>  </P>
1343  <P>  <P>
1344  Perl has no direct equivalent of PCRE_NOTEMPTY, but it does make a special case  Perl has no direct equivalent of PCRE_NOTEMPTY or PCRE_NOTEMPTY_ATSTART, but it
1345  of a pattern match of the empty string within its <b>split()</b> function, and  does make a special case of a pattern match of the empty string within its
1346  when using the /g modifier. It is possible to emulate Perl's behaviour after  <b>split()</b> function, and when using the /g modifier. It is possible to
1347  matching a null string by first trying the match again at the same offset with  emulate Perl's behaviour after matching a null string by first trying the match
1348  PCRE_NOTEMPTY and PCRE_ANCHORED, and then if that fails by advancing the  again at the same offset with PCRE_NOTEMPTY_ATSTART and PCRE_ANCHORED, and then
1349  starting offset (see below) and trying an ordinary match again. There is some  if that fails, by advancing the starting offset (see below) and trying an
1350  code that demonstrates how to do this in the <i>pcredemo.c</i> sample program.  ordinary match again. There is some code that demonstrates how to do this in
1351    the
1352    <a href="pcredemo.html"><b>pcredemo</b></a>
1353    sample program.
1354    <pre>
1355      PCRE_NO_START_OPTIMIZE
1356    </pre>
1357    There are a number of optimizations that <b>pcre_exec()</b> uses at the start of
1358    a match, in order to speed up the process. For example, if it is known that a
1359    match must start with a specific character, it searches the subject for that
1360    character, and fails immediately if it cannot find it, without actually running
1361    the main matching function. When callouts are in use, these optimizations can
1362    cause them to be skipped. This option disables the "start-up" optimizations,
1363    causing performance to suffer, but ensuring that the callouts do occur.
1364  <pre>  <pre>
1365    PCRE_NO_UTF8_CHECK    PCRE_NO_UTF8_CHECK
1366  </pre>  </pre>
# Line 1359  PCRE_NO_UTF8_CHECK is set, the effect of Line 1387  PCRE_NO_UTF8_CHECK is set, the effect of
1387  subject, or a value of <i>startoffset</i> that does not point to the start of a  subject, or a value of <i>startoffset</i> that does not point to the start of a
1388  UTF-8 character, is undefined. Your program may crash.  UTF-8 character, is undefined. Your program may crash.
1389  <pre>  <pre>
1390    PCRE_PARTIAL    PCRE_PARTIAL_HARD
1391      PCRE_PARTIAL_SOFT
1392  </pre>  </pre>
1393  This option turns on the partial matching feature. If the subject string fails  These options turn on the partial matching feature. For backwards
1394  to match the pattern, but at some point during the matching process the end of  compatibility, PCRE_PARTIAL is a synonym for PCRE_PARTIAL_SOFT. A partial match
1395  the subject was reached (that is, the subject partially matches the pattern and  occurs if the end of the subject string is reached successfully, but there are
1396  the failure to match occurred only because there were not enough subject  not enough subject characters to complete the match. If this happens when
1397  characters), <b>pcre_exec()</b> returns PCRE_ERROR_PARTIAL instead of  PCRE_PARTIAL_HARD is set, <b>pcre_exec()</b> immediately returns
1398  PCRE_ERROR_NOMATCH. When PCRE_PARTIAL is used, there are restrictions on what  PCRE_ERROR_PARTIAL. Otherwise, if PCRE_PARTIAL_SOFT is set, matching continues
1399  may appear in the pattern. These are discussed in the  by testing any other alternatives. Only if they all fail is PCRE_ERROR_PARTIAL
1400    returned (instead of PCRE_ERROR_NOMATCH). The portion of the string that
1401    was inspected when the partial match was found is set as the first matching
1402    string. There is a more detailed discussion in the
1403  <a href="pcrepartial.html"><b>pcrepartial</b></a>  <a href="pcrepartial.html"><b>pcrepartial</b></a>
1404  documentation.  documentation.
1405  </P>  </P>
# Line 1376  The string to be matched by <b>pcre_exec Line 1408  The string to be matched by <b>pcre_exec
1408  </b><br>  </b><br>
1409  <P>  <P>
1410  The subject string is passed to <b>pcre_exec()</b> as a pointer in  The subject string is passed to <b>pcre_exec()</b> as a pointer in
1411  <i>subject</i>, a length in <i>length</i>, and a starting byte offset in  <i>subject</i>, a length (in bytes) in <i>length</i>, and a starting byte offset
1412  <i>startoffset</i>. In UTF-8 mode, the byte offset must point to the start of a  in <i>startoffset</i>. In UTF-8 mode, the byte offset must point to the start of
1413  UTF-8 character. Unlike the pattern string, the subject may contain binary zero  a UTF-8 character. Unlike the pattern string, the subject may contain binary
1414  bytes. When the starting offset is zero, the search for a match starts at the  zero bytes. When the starting offset is zero, the search for a match starts at
1415  beginning of the subject, and this is by far the most common case.  the beginning of the subject, and this is by far the most common case.
1416  </P>  </P>
1417  <P>  <P>
1418  A non-zero starting offset is useful when searching for another match in the  A non-zero starting offset is useful when searching for another match in the
# Line 1418  a fragment of a pattern that picks out a Line 1450  a fragment of a pattern that picks out a
1450  kinds of parenthesized subpattern that do not cause substrings to be captured.  kinds of parenthesized subpattern that do not cause substrings to be captured.
1451  </P>  </P>
1452  <P>  <P>
1453  Captured substrings are returned to the caller via a vector of integer offsets  Captured substrings are returned to the caller via a vector of integers whose
1454  whose address is passed in <i>ovector</i>. The number of elements in the vector  address is passed in <i>ovector</i>. The number of elements in the vector is
1455  is passed in <i>ovecsize</i>, which must be a non-negative number. <b>Note</b>:  passed in <i>ovecsize</i>, which must be a non-negative number. <b>Note</b>: this
1456  this argument is NOT the size of <i>ovector</i> in bytes.  argument is NOT the size of <i>ovector</i> in bytes.
1457  </P>  </P>
1458  <P>  <P>
1459  The first two-thirds of the vector is used to pass back captured substrings,  The first two-thirds of the vector is used to pass back captured substrings,
1460  each substring using a pair of integers. The remaining third of the vector is  each substring using a pair of integers. The remaining third of the vector is
1461  used as workspace by <b>pcre_exec()</b> while matching capturing subpatterns,  used as workspace by <b>pcre_exec()</b> while matching capturing subpatterns,
1462  and is not available for passing back information. The length passed in  and is not available for passing back information. The number passed in
1463  <i>ovecsize</i> should always be a multiple of three. If it is not, it is  <i>ovecsize</i> should always be a multiple of three. If it is not, it is
1464  rounded down.  rounded down.
1465  </P>  </P>
1466  <P>  <P>
1467  When a match is successful, information about captured substrings is returned  When a match is successful, information about captured substrings is returned
1468  in pairs of integers, starting at the beginning of <i>ovector</i>, and  in pairs of integers, starting at the beginning of <i>ovector</i>, and
1469  continuing up to two-thirds of its length at the most. The first element of a  continuing up to two-thirds of its length at the most. The first element of
1470  pair is set to the offset of the first character in a substring, and the second  each pair is set to the byte offset of the first character in a substring, and
1471  is set to the offset of the first character after the end of a substring. The  the second is set to the byte offset of the first character after the end of a
1472  first pair, <i>ovector[0]</i> and <i>ovector[1]</i>, identify the portion of the  substring. <b>Note</b>: these values are always byte offsets, even in UTF-8
1473  subject string matched by the entire pattern. The next pair is used for the  mode. They are not character counts.
1474  first capturing subpattern, and so on. The value returned by <b>pcre_exec()</b>  </P>
1475  is one more than the highest numbered pair that has been set. For example, if  <P>
1476  two substrings have been captured, the returned value is 3. If there are no  The first pair of integers, <i>ovector[0]</i> and <i>ovector[1]</i>, identify the
1477  capturing subpatterns, the return value from a successful match is 1,  portion of the subject string matched by the entire pattern. The next pair is
1478  indicating that just the first pair of offsets has been set.  used for the first capturing subpattern, and so on. The value returned by
1479    <b>pcre_exec()</b> is one more than the highest numbered pair that has been set.
1480    For example, if two substrings have been captured, the returned value is 3. If
1481    there are no capturing subpatterns, the return value from a successful match is
1482    1, indicating that just the first pair of offsets has been set.
1483  </P>  </P>
1484  <P>  <P>
1485  If a capturing subpattern is matched repeatedly, it is the last portion of the  If a capturing subpattern is matched repeatedly, it is the last portion of the
# Line 1452  string that it matched that is returned. Line 1488  string that it matched that is returned.
1488  <P>  <P>
1489  If the vector is too small to hold all the captured substring offsets, it is  If the vector is too small to hold all the captured substring offsets, it is
1490  used as far as possible (up to two-thirds of its length), and the function  used as far as possible (up to two-thirds of its length), and the function
1491  returns a value of zero. In particular, if the substring offsets are not of  returns a value of zero. If the substring offsets are not of interest,
1492  interest, <b>pcre_exec()</b> may be called with <i>ovector</i> passed as NULL and  <b>pcre_exec()</b> may be called with <i>ovector</i> passed as NULL and
1493  <i>ovecsize</i> as zero. However, if the pattern contains back references and  <i>ovecsize</i> as zero. However, if the pattern contains back references and
1494  the <i>ovector</i> is not big enough to remember the related substrings, PCRE  the <i>ovector</i> is not big enough to remember the related substrings, PCRE
1495  has to get additional memory for use during matching. Thus it is usually  has to get additional memory for use during matching. Thus it is usually
# Line 1564  documentation for details of partial mat Line 1600  documentation for details of partial mat
1600  <pre>  <pre>
1601    PCRE_ERROR_BADPARTIAL     (-13)    PCRE_ERROR_BADPARTIAL     (-13)
1602  </pre>  </pre>
1603  The PCRE_PARTIAL option was used with a compiled pattern containing items that  This code is no longer in use. It was formerly returned when the PCRE_PARTIAL
1604  are not supported for partial matching. See the  option was used with a compiled pattern containing items that were not
1605  <a href="pcrepartial.html"><b>pcrepartial</b></a>  supported for partial matching. From release 8.00 onwards, there are no
1606  documentation for details of partial matching.  restrictions on partial matching.
1607  <pre>  <pre>
1608    PCRE_ERROR_INTERNAL       (-14)    PCRE_ERROR_INTERNAL       (-14)
1609  </pre>  </pre>
# Line 1739  then call <b>pcre_copy_substring()</b> o Line 1775  then call <b>pcre_copy_substring()</b> o
1775  appropriate. <b>NOTE:</b> If PCRE_DUPNAMES is set and there are duplicate names,  appropriate. <b>NOTE:</b> If PCRE_DUPNAMES is set and there are duplicate names,
1776  the behaviour may not be what you want (see the next section).  the behaviour may not be what you want (see the next section).
1777  </P>  </P>
1778    <P>
1779    <b>Warning:</b> If the pattern uses the "(?|" feature to set up multiple
1780    subpatterns with the same number, you cannot use names to distinguish them,
1781    because names are not included in the compiled code. The matching process uses
1782    only numbers.
1783    </P>
1784  <br><a name="SEC17" href="#TOC1">DUPLICATE SUBPATTERN NAMES</a><br>  <br><a name="SEC17" href="#TOC1">DUPLICATE SUBPATTERN NAMES</a><br>
1785  <P>  <P>
1786  <b>int pcre_get_stringtable_entries(const pcre *<i>code</i>,</b>  <b>int pcre_get_stringtable_entries(const pcre *<i>code</i>,</b>
# Line 1804  a compiled pattern, using a matching alg Line 1846  a compiled pattern, using a matching alg
1846  just once, and does not backtrack. This has different characteristics to the  just once, and does not backtrack. This has different characteristics to the
1847  normal algorithm, and is not compatible with Perl. Some of the features of PCRE  normal algorithm, and is not compatible with Perl. Some of the features of PCRE
1848  patterns are not supported. Nevertheless, there are times when this kind of  patterns are not supported. Nevertheless, there are times when this kind of
1849  matching can be useful. For a discussion of the two matching algorithms, see  matching can be useful. For a discussion of the two matching algorithms, and a
1850  the  list of features that <b>pcre_dfa_exec()</b> does not support, see the
1851  <a href="pcrematching.html"><b>pcrematching</b></a>  <a href="pcrematching.html"><b>pcrematching</b></a>
1852  documentation.  documentation.
1853  </P>  </P>
# Line 1847  Option bits for <b>pcre_dfa_exec()</b> Line 1889  Option bits for <b>pcre_dfa_exec()</b>
1889  <P>  <P>
1890  The unused bits of the <i>options</i> argument for <b>pcre_dfa_exec()</b> must be  The unused bits of the <i>options</i> argument for <b>pcre_dfa_exec()</b> must be
1891  zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_<i>xxx</i>,  zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_<i>xxx</i>,
1892  PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NO_UTF8_CHECK, PCRE_PARTIAL,  PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART,
1893  PCRE_DFA_SHORTEST, and PCRE_DFA_RESTART. All but the last three of these are  PCRE_NO_UTF8_CHECK, PCRE_PARTIAL_HARD, PCRE_PARTIAL_SOFT, PCRE_DFA_SHORTEST,
1894  the same as for <b>pcre_exec()</b>, so their description is not repeated here.  and PCRE_DFA_RESTART. All but the last four of these are exactly the same as
1895  <pre>  for <b>pcre_exec()</b>, so their description is not repeated here.
1896    PCRE_PARTIAL  <pre>
1897  </pre>    PCRE_PARTIAL_HARD
1898  This has the same general effect as it does for <b>pcre_exec()</b>, but the    PCRE_PARTIAL_SOFT
1899  details are slightly different. When PCRE_PARTIAL is set for  </pre>
1900  <b>pcre_dfa_exec()</b>, the return code PCRE_ERROR_NOMATCH is converted into  These have the same general effect as they do for <b>pcre_exec()</b>, but the
1901  PCRE_ERROR_PARTIAL if the end of the subject is reached, there have been no  details are slightly different. When PCRE_PARTIAL_HARD is set for
1902  complete matches, but there is still at least one matching possibility. The  <b>pcre_dfa_exec()</b>, it returns PCRE_ERROR_PARTIAL if the end of the subject
1903  portion of the string that provided the partial match is set as the first  is reached and there is still at least one matching possibility that requires
1904  matching string.  additional characters. This happens even if some complete matches have also
1905    been found. When PCRE_PARTIAL_SOFT is set, the return code PCRE_ERROR_NOMATCH
1906    is converted into PCRE_ERROR_PARTIAL if the end of the subject is reached,
1907    there have been no complete matches, but there is still at least one matching
1908    possibility. The portion of the string that was inspected when the longest
1909    partial match was found is set as the first matching string in both cases.
1910  <pre>  <pre>
1911    PCRE_DFA_SHORTEST    PCRE_DFA_SHORTEST
1912  </pre>  </pre>
# Line 1870  matching point in the subject string. Line 1917  matching point in the subject string.
1917  <pre>  <pre>
1918    PCRE_DFA_RESTART    PCRE_DFA_RESTART
1919  </pre>  </pre>
1920  When <b>pcre_dfa_exec()</b> is called with the PCRE_PARTIAL option, and returns  When <b>pcre_dfa_exec()</b> returns a partial match, it is possible to call it
1921  a partial match, it is possible to call it again, with additional subject  again, with additional subject characters, and have it continue with the same
1922  characters, and have it continue with the same match. The PCRE_DFA_RESTART  match. The PCRE_DFA_RESTART option requests this action; when it is set, the
1923  option requests this action; when it is set, the <i>workspace</i> and  <i>workspace</i> and <i>wscount</i> options must reference the same vector as
1924  <i>wscount</i> options must reference the same vector as before because data  before because data about the match so far is left in them after a partial
1925  about the match so far is left in them after a partial match. There is more  match. There is more discussion of this facility in the
 discussion of this facility in the  
1926  <a href="pcrepartial.html"><b>pcrepartial</b></a>  <a href="pcrepartial.html"><b>pcrepartial</b></a>
1927  documentation.  documentation.
1928  </P>  </P>
# Line 1972  Cambridge CB2 3QH, England. Line 2018  Cambridge CB2 3QH, England.
2018  </P>  </P>
2019  <br><a name="SEC22" href="#TOC1">REVISION</a><br>  <br><a name="SEC22" href="#TOC1">REVISION</a><br>
2020  <P>  <P>
2021  Last updated: 12 April 2008  Last updated: 11 September 2009
2022  <br>  <br>
2023  Copyright &copy; 1997-2008 University of Cambridge.  Copyright &copy; 1997-2009 University of Cambridge.
2024  <br>  <br>
2025  <p>  <p>
2026  Return to the <a href="index.html">PCRE index page</a>.  Return to the <a href="index.html">PCRE index page</a>.

Legend:
Removed from v.345  
changed lines
  Added in v.453

  ViewVC Help
Powered by ViewVC 1.1.5