| 58 |
are set, PCRE_PARTIAL_HARD takes precedence. |
are set, PCRE_PARTIAL_HARD takes precedence. |
| 59 |
</P> |
</P> |
| 60 |
<P> |
<P> |
| 61 |
Setting a partial matching option disables one of PCRE's optimizations. PCRE |
Setting a partial matching option disables two of PCRE's optimizations. PCRE |
| 62 |
remembers the last literal byte in a pattern, and abandons matching immediately |
remembers the last literal byte in a pattern, and abandons matching immediately |
| 63 |
if such a byte is not present in the subject string. This optimization cannot |
if such a byte is not present in the subject string. This optimization cannot |
| 64 |
be used for a subject string that might match only partially. |
be used for a subject string that might match only partially. If the pattern |
| 65 |
|
was studied, PCRE knows the minimum length of a matching string, and does not |
| 66 |
|
bother to run the matching function on shorter strings. This optimization is |
| 67 |
|
also disabled for partial matching. |
| 68 |
</P> |
</P> |
| 69 |
<br><a name="SEC2" href="#TOC1">PARTIAL MATCHING USING pcre_exec()</a><br> |
<br><a name="SEC2" href="#TOC1">PARTIAL MATCHING USING pcre_exec()</a><br> |
| 70 |
<P> |
<P> |
| 81 |
vector, the first of them is set to the offset of the earliest character that |
vector, the first of them is set to the offset of the earliest character that |
| 82 |
was inspected when the partial match was found. For convenience, the second |
was inspected when the partial match was found. For convenience, the second |
| 83 |
offset points to the end of the string so that a substring can easily be |
offset points to the end of the string so that a substring can easily be |
| 84 |
extracted. |
identified. |
| 85 |
</P> |
</P> |
| 86 |
<P> |
<P> |
| 87 |
For the majority of patterns, the first offset identifies the start of the |
For the majority of patterns, the first offset identifies the start of the |
| 385 |
</P> |
</P> |
| 386 |
<br><a name="SEC11" href="#TOC1">REVISION</a><br> |
<br><a name="SEC11" href="#TOC1">REVISION</a><br> |
| 387 |
<P> |
<P> |
| 388 |
Last updated: 05 September 2009 |
Last updated: 29 September 2009 |
| 389 |
<br> |
<br> |
| 390 |
Copyright © 1997-2009 University of Cambridge. |
Copyright © 1997-2009 University of Cambridge. |
| 391 |
<br> |
<br> |