[Pcre-svn] [557] code/trunk/doc/pcrepattern.3: Add more expl…

Página Inicial
Delete this message
Autor: Subversion repository
Data:  
Para: pcre-svn
Assunto: [Pcre-svn] [557] code/trunk/doc/pcrepattern.3: Add more explanation about conditional subpatterns.
Revision: 557
          http://vcs.pcre.org/viewvc?view=rev&revision=557
Author:   ph10
Date:     2010-10-26 16:26:12 +0100 (Tue, 26 Oct 2010)


Log Message:
-----------
Add more explanation about conditional subpatterns.

Modified Paths:
--------------
    code/trunk/doc/pcrepattern.3


Modified: code/trunk/doc/pcrepattern.3
===================================================================
--- code/trunk/doc/pcrepattern.3    2010-10-26 11:06:44 UTC (rev 556)
+++ code/trunk/doc/pcrepattern.3    2010-10-26 15:26:12 UTC (rev 557)
@@ -1966,7 +1966,14 @@
 .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.