summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2010-10-26 15:26:12 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2010-10-26 15:26:12 +0000
commit2d84b92907706e92e18d3e579ff3e7cd924f73aa (patch)
treefa03991f976df1c69d8671d32ff67168eeefc382
parent32ebaf1e2edf0e1a456e0fa9ccf8f8c71c56ef34 (diff)
downloadpcre-2d84b92907706e92e18d3e579ff3e7cd924f73aa.tar.gz
Add more explanation about conditional subpatterns.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@557 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--doc/pcrepattern.39
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/pcrepattern.3 b/doc/pcrepattern.3
index 9f9f1ef..ecbcc9f 100644
--- a/doc/pcrepattern.3
+++ b/doc/pcrepattern.3
@@ -1966,7 +1966,14 @@ already been matched. The two possible forms of conditional subpattern are:
.sp
If the condition is satisfied, the yes-pattern is used; otherwise the
no-pattern (if present) is used. If there are more than two alternatives in the
-subpattern, a compile-time error occurs.
+subpattern, a compile-time error occurs. Each of the two alternatives may
+itself contain nested subpatterns of any form, including conditional
+subpatterns; the restriction to two alternatives applies only at the level of
+the condition. This pattern fragment is an example where the alternatives are
+complex:
+.sp
+ (?(1) (A|B|C) | (D | (?(2)E|F) | E) )
+.sp
.P
There are four kinds of condition: references to subpatterns, references to
recursion, a pseudo-condition called DEFINE, and assertions.