| 32 |
the details differ between the two types of matching function. If both options |
the details differ between the two types of matching function. If both options |
| 33 |
are set, PCRE_PARTIAL_HARD takes precedence. |
are set, PCRE_PARTIAL_HARD takes precedence. |
| 34 |
.P |
.P |
| 35 |
If you want to use partial matching with just-in-time optimized code, you must |
If you want to use partial matching with just-in-time optimized code, you must |
| 36 |
call \fBpcre_study()\fP or \fBpcre16_study()\fP with one or both of these |
call \fBpcre_study()\fP or \fBpcre16_study()\fP with one or both of these |
| 37 |
options: |
options: |
| 38 |
.sp |
.sp |
| 39 |
PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE |
PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE |
| 40 |
PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE |
PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE |
| 41 |
.sp |
.sp |
| 42 |
PCRE_STUDY_JIT_COMPILE should also be set if you are going to run non-partial |
PCRE_STUDY_JIT_COMPILE should also be set if you are going to run non-partial |
| 43 |
matches on the same pattern. If the appropriate JIT study mode has not been set |
matches on the same pattern. If the appropriate JIT study mode has not been set |
| 44 |
for a match, the interpretive matching code is used. |
for a match, the interpretive matching code is used. |
| 45 |
.P |
.P |
| 328 |
.P |
.P |
| 329 |
2. Lookbehind assertions that have already been obeyed are catered for in the |
2. Lookbehind assertions that have already been obeyed are catered for in the |
| 330 |
offsets that are returned for a partial match. However a lookbehind assertion |
offsets that are returned for a partial match. However a lookbehind assertion |
| 331 |
later in the pattern could require even earlier characters to be inspected. You |
later in the pattern could require even earlier characters to be inspected. You |
| 332 |
can handle this case by using the PCRE_INFO_MAXLOOKBEHIND option of the |
can handle this case by using the PCRE_INFO_MAXLOOKBEHIND option of the |
| 333 |
\fBpcre_fullinfo()\fP or \fBpcre16_fullinfo()\fP functions to obtain the length |
\fBpcre_fullinfo()\fP or \fBpcre16_fullinfo()\fP functions to obtain the length |
| 334 |
of the largest lookbehind in the pattern. This length is given in characters, |
of the largest lookbehind in the pattern. This length is given in characters, |
| 335 |
not bytes. If you always retain at least that many characters before the |
not bytes. If you always retain at least that many characters before the |
| 345 |
data> ab\eP |
data> ab\eP |
| 346 |
No match |
No match |
| 347 |
.sp |
.sp |
| 348 |
If the next segment begins "cx", a match should be found, but this will only |
If the next segment begins "cx", a match should be found, but this will only |
| 349 |
happen if characters from the previous segment are retained. For this reason, a |
happen if characters from the previous segment are retained. For this reason, a |
| 350 |
"no match" result should be interpreted as "partial match of an empty string" |
"no match" result should be interpreted as "partial match of an empty string" |
| 351 |
when the pattern contains lookbehinds. |
when the pattern contains lookbehinds. |