--- code/trunk/doc/pcrematching.3 2010/11/16 17:51:37 571
+++ code/trunk/doc/pcrematching.3 2010/11/17 17:55:57 572
@@ -83,16 +83,17 @@
no more unterminated paths. At this point, terminated paths represent the
different matching possibilities (if there are none, the match has failed).
Thus, if there is more than one possible match, this algorithm finds all of
-them, and in particular, it finds the longest. There is an option to stop the
-algorithm after the first match (which is necessarily the shortest) is found.
+them, and in particular, it finds the longest. The matches are returned in
+decreasing order of length. There is an option to stop the algorithm after the
+first match (which is necessarily the shortest) is found.
.P
Note that all the matches that are found start at the same point in the
subject. If the pattern
.sp
- cat(er(pillar)?)
+ cat(er(pillar)?)?
.sp
is matched against the string "the caterpillar catchment", the result will be
-the three strings "cat", "cater", and "caterpillar" that start at the fourth
+the three strings "caterpillar", "cater", and "cat" that start at the fifth
character of the subject. The algorithm does not automatically move on to find
matches that start at later positions.
.P
@@ -151,8 +152,9 @@
2. Because the alternative algorithm scans the subject string just once, and
never needs to backtrack, it is possible to pass very long subject strings to
the matching function in several pieces, checking for partial matching each
-time. It is possible to do multi-segment matching using \fBpcre_exec()\fP (by
-retaining partially matched substrings), but it is more complicated. The
+time. Although it is possible to do multi-segment matching using the standard
+algorithm (\fBpcre_exec()\fP), by retaining partially matched substrings, it is
+more complicated. The
.\" HREF
\fBpcrepartial\fP
.\"
@@ -189,6 +191,6 @@
.rs
.sp
.nf
-Last updated: 22 October 2010
+Last updated: 17 November 2010
Copyright (c) 1997-2010 University of Cambridge.
.fi