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

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

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

revision 903 by ph10, Sat Jan 21 16:37:17 2012 UTC revision 930 by ph10, Fri Feb 24 12:05:54 2012 UTC
# Line 2598  characters that does not include a closi Line 2598  characters that does not include a closi
2598  that is, if the closing parenthesis immediately follows the colon, the effect  that is, if the closing parenthesis immediately follows the colon, the effect
2599  is as if the colon were not there. Any number of these verbs may occur in a  is as if the colon were not there. Any number of these verbs may occur in a
2600  pattern.  pattern.
2601  .P  .
2602    .
2603    .\" HTML <a name="nooptimize"></a>
2604    .SS "Optimizations that affect backtracking verbs"
2605    .rs
2606    .sp
2607  PCRE contains some optimizations that are used to speed up matching by running  PCRE contains some optimizations that are used to speed up matching by running
2608  some checks at the start of each match attempt. For example, it may know the  some checks at the start of each match attempt. For example, it may know the
2609  minimum length of matching subject, or that a particular character must be  minimum length of matching subject, or that a particular character must be
# Line 2606  present. When one of these optimizations Line 2611  present. When one of these optimizations
2611  included backtracking verbs will not, of course, be processed. You can suppress  included backtracking verbs will not, of course, be processed. You can suppress
2612  the start-of-match optimizations by setting the PCRE_NO_START_OPTIMIZE option  the start-of-match optimizations by setting the PCRE_NO_START_OPTIMIZE option
2613  when calling \fBpcre_compile()\fP or \fBpcre_exec()\fP, or by starting the  when calling \fBpcre_compile()\fP or \fBpcre_exec()\fP, or by starting the
2614  pattern with (*NO_START_OPT).  pattern with (*NO_START_OPT). There is more discussion of this option in the
2615    section entitled
2616    .\" HTML <a href="pcreapi.html#execoptions">
2617    .\" </a>
2618    "Option bits for \fBpcre_exec()\fP"
2619    .\"
2620    in the
2621    .\" HREF
2622    \fBpcreapi\fP
2623    .\"
2624    documentation.
2625  .P  .P
2626  Experiments with Perl suggest that it too has similar optimizations, sometimes  Experiments with Perl suggest that it too has similar optimizations, sometimes
2627  leading to anomalous results.  leading to anomalous results.
# Line 2695  After a partial match or a failed match, Line 2710  After a partial match or a failed match,
2710    No match, mark = B    No match, mark = B
2711  .sp  .sp
2712  Note that in this unanchored example the mark is retained from the match  Note that in this unanchored example the mark is retained from the match
2713  attempt that started at the letter "X". Subsequent match attempts starting at  attempt that started at the letter "X" in the subject. Subsequent match
2714  "P" and then with an empty string do not get as far as the (*MARK) item, but  attempts starting at "P" and then with an empty string do not get as far as the
2715  nevertheless do not reset it.  (*MARK) item, but nevertheless do not reset it.
2716    .P
2717    If you are interested in (*MARK) values after failed matches, you should
2718    probably set the PCRE_NO_START_OPTIMIZE option
2719    .\" HTML <a href="#nooptimize">
2720    .\" </a>
2721    (see above)
2722    .\"
2723    to ensure that the match is always attempted.
2724  .  .
2725  .  .
2726  .SS "Verbs that act after backtracking"  .SS "Verbs that act after backtracking"
# Line 2876  Cambridge CB2 3QH, England. Line 2899  Cambridge CB2 3QH, England.
2899  .rs  .rs
2900  .sp  .sp
2901  .nf  .nf
2902  Last updated: 09 January 2012  Last updated: 24 February 2012
2903  Copyright (c) 1997-2012 University of Cambridge.  Copyright (c) 1997-2012 University of Cambridge.
2904  .fi  .fi

Legend:
Removed from v.903  
changed lines
  Added in v.930

  ViewVC Help
Powered by ViewVC 1.1.5