/[pcre]/code/trunk/doc/html/pcrecallout.html
ViewVC logotype

Diff of /code/trunk/doc/html/pcrecallout.html

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

revision 392 by ph10, Tue Mar 17 21:30:30 2009 UTC revision 461 by ph10, Mon Oct 5 10:59:35 2009 UTC
# Line 39  For example, this pattern has two callou Line 39  For example, this pattern has two callou
39  <pre>  <pre>
40    (?C1)abc(?C2)def    (?C1)abc(?C2)def
41  </pre>  </pre>
42  If the PCRE_AUTO_CALLOUT option bit is set when <b>pcre_compile()</b> is called,  If the PCRE_AUTO_CALLOUT option bit is set when <b>pcre_compile()</b> or
43  PCRE automatically inserts callouts, all with number 255, before each item in  <b>pcre_compile2()</b> is called, PCRE automatically inserts callouts, all with
44  the pattern. For example, if PCRE_AUTO_CALLOUT is used with the pattern  number 255, before each item in the pattern. For example, if PCRE_AUTO_CALLOUT
45    is used with the pattern
46  <pre>  <pre>
47    A(\d{2}|--)    A(\d{2}|--)
48  </pre>  </pre>
# Line 73  the callout is never reached. However, w Line 74  the callout is never reached. However, w
74  no match, the callout is obeyed.  no match, the callout is obeyed.
75  </P>  </P>
76  <P>  <P>
77    If the pattern is studied, PCRE knows the minimum length of a matching string,
78    and will immediately give a "no match" return without actually running a match
79    if the subject is not long enough, or, for unanchored patterns, if it has
80    been scanned far enough.
81    </P>
82    <P>
83  You can disable these optimizations by passing the PCRE_NO_START_OPTIMIZE  You can disable these optimizations by passing the PCRE_NO_START_OPTIMIZE
84  option to <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>. This slows down the  option to <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>. This slows down the
85  matching process, but does ensure that callouts such as the example above are  matching process, but does ensure that callouts such as the example above are
# Line 179  The external callout function returns an Line 186  The external callout function returns an
186  matching proceeds as normal. If the value is greater than zero, matching fails  matching proceeds as normal. If the value is greater than zero, matching fails
187  at the current point, but the testing of other matching possibilities goes  at the current point, but the testing of other matching possibilities goes
188  ahead, just as if a lookahead assertion had failed. If the value is less than  ahead, just as if a lookahead assertion had failed. If the value is less than
189  zero, the match is abandoned, and <b>pcre_exec()</b> (or <b>pcre_dfa_exec()</b>)  zero, the match is abandoned, and <b>pcre_exec()</b> or <b>pcre_dfa_exec()</b>
190  returns the negative value.  returns the negative value.
191  </P>  </P>
192  <P>  <P>
# Line 199  Cambridge CB2 3QH, England. Line 206  Cambridge CB2 3QH, England.
206  </P>  </P>
207  <br><a name="SEC6" href="#TOC1">REVISION</a><br>  <br><a name="SEC6" href="#TOC1">REVISION</a><br>
208  <P>  <P>
209  Last updated: 15 March 2009  Last updated: 29 September 2009
210  <br>  <br>
211  Copyright &copy; 1997-2009 University of Cambridge.  Copyright &copy; 1997-2009 University of Cambridge.
212  <br>  <br>

Legend:
Removed from v.392  
changed lines
  Added in v.461

  ViewVC Help
Powered by ViewVC 1.1.5