--- code/trunk/doc/html/pcrecallout.html 2009/03/17 21:30:30 392 +++ code/trunk/doc/html/pcrecallout.html 2009/10/05 10:59:35 461 @@ -39,9 +39,10 @@
   (?C1)abc(?C2)def
 
-If the PCRE_AUTO_CALLOUT option bit is set when pcre_compile() is called, -PCRE automatically inserts callouts, all with number 255, before each item in -the pattern. For example, if PCRE_AUTO_CALLOUT is used with the pattern +If the PCRE_AUTO_CALLOUT option bit is set when pcre_compile() or +pcre_compile2() is called, PCRE automatically inserts callouts, all with +number 255, before each item in the pattern. For example, if PCRE_AUTO_CALLOUT +is used with the pattern
   A(\d{2}|--)
 
@@ -73,6 +74,12 @@ no match, the callout is obeyed.

+If the pattern is studied, PCRE knows the minimum length of a matching string, +and will immediately give a "no match" return without actually running a match +if the subject is not long enough, or, for unanchored patterns, if it has +been scanned far enough. +

+

You can disable these optimizations by passing the PCRE_NO_START_OPTIMIZE option to pcre_exec() or pcre_dfa_exec(). This slows down the matching process, but does ensure that callouts such as the example above are @@ -179,7 +186,7 @@ matching proceeds as normal. If the value is greater than zero, matching fails at the current point, but the testing of other matching possibilities goes ahead, just as if a lookahead assertion had failed. If the value is less than -zero, the match is abandoned, and pcre_exec() (or pcre_dfa_exec()) +zero, the match is abandoned, and pcre_exec() or pcre_dfa_exec() returns the negative value.

@@ -199,7 +206,7 @@


REVISION

-Last updated: 15 March 2009 +Last updated: 29 September 2009
Copyright © 1997-2009 University of Cambridge.