Home | History | Annotate | Download | only in doc

Lines Matching full:partial

4 .SH "PARTIAL MATCHING IN PCRE"
24 entered. Partial matching can also be useful when the subject string is very
27 PCRE supports partial matching by means of the PCRE_PARTIAL_SOFT and
31 or not a partial match is preferred to an alternative complete match, though
35 If you want to use partial matching with just-in-time optimized code, you must
42 PCRE_STUDY_JIT_COMPILE should also be set if you are going to run non-partial
46 Setting a partial matching option disables two of PCRE's standard
52 strings. This optimization is also disabled for partial matching.
55 .SH "PARTIAL MATCHING USING pcre_exec() OR pcre[16|32]_exec()"
58 A partial match occurs during a call to \fBpcre_exec()\fP or
66 restriction there would always be a partial match of an empty string at the end
69 If there are at least two slots in the offsets vector when a partial match is
84 string is "xyzabc12", the first two offsets after a partial match are for the
88 What happens when a partial match is identified depends on which of the two
89 partial matching options are set.
96 identifies a partial match, the partial match is remembered, but matching
101 This option is "soft" because it prefers a complete match over a partial match.
107 If there is more than one partial match, the first one that was found provides
115 identifying "123dog" as the first partial match that was found. (In this
116 example, there are two partial matches, because "dog" on its own partially
124 PCRE_ERROR_PARTIAL is returned as soon as a partial match is found, without
126 because it prefers an earlier partial match over a later complete match. For
141 .SS "Comparing hard and soft partial matching"
144 The difference between the two partial matching options can be illustrated by a
168 .SH "PARTIAL MATCHING USING pcre_dfa_exec() OR pcre[16|32]_dfa_exec()"
174 of a partial match, again provided that at least one character has been
179 However, if PCRE_PARTIAL_HARD is set, a partial match takes precedence over any
181 partial match was found is set as the first matching string, provided there are
192 "dog", the DFA functions also find the partial match for "dogsbody", and so
196 .SH "PARTIAL MATCHING AND WORD BOUNDARIES"
200 boundaries, partial matching with PCRE_PARTIAL_SOFT can give counter-intuitive
207 character cannot take place, so a partial match is found. However, normal
211 PCRE_ERROR_PARTIAL, because then the partial match takes precedence.
221 partial matching with can be requested for any pattern.
228 pattern can be used for partial matching now always returns 1.
231 .SH "EXAMPLE OF PARTIAL MATCHING USING PCRETEST"
243 Partial match: 23dec3
245 Partial match: 3ju
253 pattern, but the first two are partial matches. Similar output is obtained
263 When a partial match has been found using a DFA matching function, it is
267 because this is where details of the previous partial match are stored. Here is
273 Partial match: 23ja
277 The first call has "23ja" as the subject, and requests partial matching; the
293 PCRE_DFA_RESTART to continue partial matching over multiple segments. This
305 from the point where the partial match occurred. Earlier data can be discarded.
313 Partial match: 23ja
322 with \eb or \eB, the string that is returned for a partial match includes
325 partial match.
341 offsets that are returned for a partial match. However a lookbehind assertion
360 and 5. This indicates that the matching process that gave a partial match
369 Partial match at offset 5: 123a
371 3. Because a partial match must always contain at least one character, what
372 might be considered a partial match of an empty string actually gives a "no
381 "no match" result should be interpreted as "partial match of an empty string"
386 especially when PCRE_PARTIAL_SOFT is used. The section "Partial Matching and
389 matching possibilities, because (for PCRE_PARTIAL_SOFT) a partial match result
398 Partial match: do
406 setting the PCRE_PARTIAL_SOFT option. Although the string is a partial match
419 Partial match: dogsb
421 Partial match: do
423 Partial match: gsb
431 If the first part of the subject is "ABC123", a partial match of the first
432 alternative is found at offset 3. There is no partial match for the second
442 where no string can be a partial match for both alternatives. This is not a
448 Partial match: 123
454 possibility is to work with two buffers. If a partial match at offset \fIn\fP