| 32 |
though the details differ between the two matching functions. If both options |
though the details differ between the two matching functions. If both options |
| 33 |
are set, PCRE_PARTIAL_HARD takes precedence. |
are set, PCRE_PARTIAL_HARD takes precedence. |
| 34 |
.P |
.P |
| 35 |
Setting a partial matching option disables one of PCRE's optimizations. PCRE |
Setting a partial matching option disables two of PCRE's optimizations. PCRE |
| 36 |
remembers the last literal byte in a pattern, and abandons matching immediately |
remembers the last literal byte in a pattern, and abandons matching immediately |
| 37 |
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 |
| 38 |
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 |
| 39 |
|
was studied, PCRE knows the minimum length of a matching string, and does not |
| 40 |
|
bother to run the matching function on shorter strings. This optimization is |
| 41 |
|
also disabled for partial matching. |
| 42 |
. |
. |
| 43 |
. |
. |
| 44 |
.SH "PARTIAL MATCHING USING pcre_exec()" |
.SH "PARTIAL MATCHING USING pcre_exec()" |
| 56 |
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 |
| 57 |
was inspected when the partial match was found. For convenience, the second |
was inspected when the partial match was found. For convenience, the second |
| 58 |
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 |
| 59 |
extracted. |
identified. |
| 60 |
.P |
.P |
| 61 |
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 |
| 62 |
partially matched string. However, for patterns that contain lookbehind |
partially matched string. However, for patterns that contain lookbehind |
| 361 |
.rs |
.rs |
| 362 |
.sp |
.sp |
| 363 |
.nf |
.nf |
| 364 |
Last updated: 05 September 2009 |
Last updated: 29 September 2009 |
| 365 |
Copyright (c) 1997-2009 University of Cambridge. |
Copyright (c) 1997-2009 University of Cambridge. |
| 366 |
.fi |
.fi |