| 1532 |
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 |
| 1533 |
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 |
| 1534 |
not enough subject characters to complete the match. If this happens when |
not enough subject characters to complete the match. If this happens when |
| 1535 |
PCRE_PARTIAL_HARD is set, \fBpcre_exec()\fP immediately returns |
PCRE_PARTIAL_SOFT (but not PCRE_PARTIAL_HARD) is set, matching continues by |
| 1536 |
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 |
| 1537 |
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, |
| 1538 |
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, |
| 1539 |
was inspected when the partial match was found is set as the first matching |
but only if no complete match can be found. |
| 1540 |
string. There is a more detailed discussion in the |
.P |
| 1541 |
|
If PCRE_PARTIAL_HARD is set, it overrides PCRE_PARTIAL_SOFT. In this case, if a |
| 1542 |
|
partial match is found, \fBpcre_exec()\fP immediately returns |
| 1543 |
|
PCRE_ERROR_PARTIAL, without considering any other alternatives. In other words, |
| 1544 |
|
when PCRE_PARTIAL_HARD is set, a partial match is considered to be more |
| 1545 |
|
important that an alternative complete match. |
| 1546 |
|
.P |
| 1547 |
|
In both cases, the portion of the string that was inspected when the partial |
| 1548 |
|
match was found is set as the first matching string. There is a more detailed |
| 1549 |
|
discussion of partial and multi-segment matching, with examples, in the |
| 1550 |
.\" HREF |
.\" HREF |
| 1551 |
\fBpcrepartial\fP |
\fBpcrepartial\fP |
| 1552 |
.\" |
.\" |
| 2068 |
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 |
| 2069 |
possibility. The portion of the string that was inspected when the longest |
possibility. The portion of the string that was inspected when the longest |
| 2070 |
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. |
| 2071 |
|
There is a more detailed discussion of partial and multi-segment matching, with |
| 2072 |
|
examples, in the |
| 2073 |
|
.\" HREF |
| 2074 |
|
\fBpcrepartial\fP |
| 2075 |
|
.\" |
| 2076 |
|
documentation. |
| 2077 |
.sp |
.sp |
| 2078 |
PCRE_DFA_SHORTEST |
PCRE_DFA_SHORTEST |
| 2079 |
.sp |
.sp |
| 2193 |
.rs |
.rs |
| 2194 |
.sp |
.sp |
| 2195 |
.nf |
.nf |
| 2196 |
Last updated: 21 June 2010 |
Last updated: 22 October 2010 |
| 2197 |
Copyright (c) 1997-2010 University of Cambridge. |
Copyright (c) 1997-2010 University of Cambridge. |
| 2198 |
.fi |
.fi |