/[pcre]/code/trunk/doc/pcrepartial.3
ViewVC logotype

Diff of /code/trunk/doc/pcrepartial.3

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 96 by nigel, Fri Mar 2 13:10:43 2007 UTC revision 155 by ph10, Tue Apr 24 13:36:11 2007 UTC
# Line 99  pattern, but the first two are partial m Line 99  pattern, but the first two are partial m
99  \fBpcre_dfa_exec()\fP matching (by means of the \eD escape sequence), produces  \fBpcre_dfa_exec()\fP matching (by means of the \eD escape sequence), produces
100  the following output:  the following output:
101  .sp  .sp
102      re> /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/      re> /^\ed?\ed(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\ed\ed$/
103    data> 25jun04\eP\eD    data> 25jun04\eP\eD
104     0: 25jun04     0: 25jun04
105    data> 23dec3\eP\eD    data> 23dec3\eP\eD
# Line 126  space as before, because this is where d Line 126  space as before, because this is where d
126  are stored. Here is an example using \fBpcretest\fP, using the \eR escape  are stored. Here is an example using \fBpcretest\fP, using the \eR escape
127  sequence to set the PCRE_DFA_RESTART option (\eP and \eD are as above):  sequence to set the PCRE_DFA_RESTART option (\eP and \eD are as above):
128  .sp  .sp
129      re> /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/      re> /^\ed?\ed(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\ed\ed$/
130    data> 23ja\eP\eD    data> 23ja\eP\eD
131    Partial match: 23ja    Partial match: 23ja
132    data> n05\eR\eD    data> n05\eR\eD
# Line 157  bytes at the start of the buffer. Line 157  bytes at the start of the buffer.
157  always produce exactly the same result as matching over one single long string.  always produce exactly the same result as matching over one single long string.
158  The difference arises when there are multiple matching possibilities, because a  The difference arises when there are multiple matching possibilities, because a
159  partial match result is given only when there are no completed matches in a  partial match result is given only when there are no completed matches in a
160  call to fBpcre_dfa_exec()\fP. This means that as soon as the shortest match has  call to \fBpcre_dfa_exec()\fP. This means that as soon as the shortest match has
161  been found, continuation to a new subject segment is no longer possible.  been found, continuation to a new subject segment is no longer possible.
162  Consider this \fBpcretest\fP example:  Consider this \fBpcretest\fP example:
163  .sp  .sp
# Line 198  patterns or patterns such as: Line 198  patterns or patterns such as:
198  where no string can be a partial match for both alternatives.  where no string can be a partial match for both alternatives.
199  .  .
200  .  .
201  .P  .SH AUTHOR
202  .in 0  .rs
203  Last updated: 30 November 2006  .sp
204  .br  .nf
205  Copyright (c) 1997-2006 University of Cambridge.  Philip Hazel
206    University Computing Service
207    Cambridge CB2 3QH, England.
208    .fi
209    .
210    .
211    .SH REVISION
212    .rs
213    .sp
214    .nf
215    Last updated: 06 March 2007
216    Copyright (c) 1997-2007 University of Cambridge.
217    .fi

Legend:
Removed from v.96  
changed lines
  Added in v.155

  ViewVC Help
Powered by ViewVC 1.1.5