summaryrefslogtreecommitdiff
path: root/doc/pcrepattern.3
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2013-03-17 17:13:14 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2013-03-17 17:13:14 +0000
commitd87a4298d0019e7a31506fa67e1537c7f4c442a1 (patch)
tree86e394e1b94010157cd7aa60c92f466580796bcb /doc/pcrepattern.3
parent398a48b6d0fe822f10d56f71a30328a1f8f422b1 (diff)
downloadpcre-d87a4298d0019e7a31506fa67e1537c7f4c442a1.tar.gz
Document new multiple backtracking verb behaviour.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1293 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'doc/pcrepattern.3')
-rw-r--r--doc/pcrepattern.316
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/pcrepattern.3 b/doc/pcrepattern.3
index 93a0d79..865325c 100644
--- a/doc/pcrepattern.3
+++ b/doc/pcrepattern.3
@@ -2973,16 +2973,16 @@ unanchored pattern). (*SKIP) is similar, except that the advance may be more
than one character. (*COMMIT) is the strongest, causing the entire match to
fail.
.P
-If more than one such verb is present in a pattern, the "strongest" one wins.
-For example, consider this pattern, where A, B, etc. are complex pattern
-fragments:
+If more than one such verb is present in a pattern, the one that is backtracked
+onto first acts. For example, consider this pattern, where A, B, etc. are
+complex pattern fragments:
.sp
- (A(*COMMIT)B(*THEN)C|D)
+ (A(*COMMIT)B(*THEN)C|ABD)
.sp
-Once A has matched, PCRE is committed to this match, at the current starting
-position. If subsequently B matches, but C does not, the normal (*THEN) action
-of trying the next alternative (that is, D) does not happen because (*COMMIT)
-overrides.
+If A matches but B fails, the backtrack to (*COMMIT) causes the entire match to
+fail. However, if A and B match, but C fails, the backtrack to (*THEN) causes
+the next alternative (ABD) to be tried. This behaviour is consistent, but is
+not always the same as Perl's.
.
.
.SH "SEE ALSO"