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

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

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

revision 548 by ph10, Fri Jun 25 14:42:00 2010 UTC revision 566 by ph10, Wed Nov 3 18:32:55 2010 UTC
# Line 1450  the Line 1450  the
1450  .\" HREF  .\" HREF
1451  \fBpcredemo\fP  \fBpcredemo\fP
1452  .\"  .\"
1453  sample program.  sample program. In the most general case, you have to check to see if the
1454    newline convention recognizes CRLF as a newline, and if so, and the current
1455    character is CR followed by LF, advance the starting offset by two characters
1456    instead of one.
1457  .sp  .sp
1458    PCRE_NO_START_OPTIMIZE    PCRE_NO_START_OPTIMIZE
1459  .sp  .sp
# Line 1532  These options turn on the partial matchi Line 1535  These options turn on the partial matchi
1535  compatibility, PCRE_PARTIAL is a synonym for PCRE_PARTIAL_SOFT. A partial match  compatibility, PCRE_PARTIAL is a synonym for PCRE_PARTIAL_SOFT. A partial match
1536  occurs if the end of the subject string is reached successfully, but there are  occurs if the end of the subject string is reached successfully, but there are
1537  not enough subject characters to complete the match. If this happens when  not enough subject characters to complete the match. If this happens when
1538  PCRE_PARTIAL_HARD is set, \fBpcre_exec()\fP immediately returns  PCRE_PARTIAL_SOFT (but not PCRE_PARTIAL_HARD) is set, matching continues by
1539  PCRE_ERROR_PARTIAL. Otherwise, if PCRE_PARTIAL_SOFT is set, matching continues  testing any remaining alternatives. Only if no complete match can be found is
1540  by testing any other alternatives. Only if they all fail is PCRE_ERROR_PARTIAL  PCRE_ERROR_PARTIAL returned instead of PCRE_ERROR_NOMATCH. In other words,
1541  returned (instead of PCRE_ERROR_NOMATCH). The portion of the string that  PCRE_PARTIAL_SOFT says that the caller is prepared to handle a partial match,
1542  was inspected when the partial match was found is set as the first matching  but only if no complete match can be found.
1543  string. There is a more detailed discussion in the  .P
1544    If PCRE_PARTIAL_HARD is set, it overrides PCRE_PARTIAL_SOFT. In this case, if a
1545    partial match is found, \fBpcre_exec()\fP immediately returns
1546    PCRE_ERROR_PARTIAL, without considering any other alternatives. In other words,
1547    when PCRE_PARTIAL_HARD is set, a partial match is considered to be more
1548    important that an alternative complete match.
1549    .P
1550    In both cases, the portion of the string that was inspected when the partial
1551    match was found is set as the first matching string. There is a more detailed
1552    discussion of partial and multi-segment matching, with examples, in the
1553  .\" HREF  .\" HREF
1554  \fBpcrepartial\fP  \fBpcrepartial\fP
1555  .\"  .\"
# Line 2059  is converted into PCRE_ERROR_PARTIAL if Line 2071  is converted into PCRE_ERROR_PARTIAL if
2071  there have been no complete matches, but there is still at least one matching  there have been no complete matches, but there is still at least one matching
2072  possibility. The portion of the string that was inspected when the longest  possibility. The portion of the string that was inspected when the longest
2073  partial match was found is set as the first matching string in both cases.  partial match was found is set as the first matching string in both cases.
2074    There is a more detailed discussion of partial and multi-segment matching, with
2075    examples, in the
2076    .\" HREF
2077    \fBpcrepartial\fP
2078    .\"
2079    documentation.
2080  .sp  .sp
2081    PCRE_DFA_SHORTEST    PCRE_DFA_SHORTEST
2082  .sp  .sp
# Line 2178  Cambridge CB2 3QH, England. Line 2196  Cambridge CB2 3QH, England.
2196  .rs  .rs
2197  .sp  .sp
2198  .nf  .nf
2199  Last updated: 21 June 2010  Last updated: 01 November 2010
2200  Copyright (c) 1997-2010 University of Cambridge.  Copyright (c) 1997-2010 University of Cambridge.
2201  .fi  .fi

Legend:
Removed from v.548  
changed lines
  Added in v.566

  ViewVC Help
Powered by ViewVC 1.1.5