/[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 63 by nigel, Sat Feb 24 21:40:03 2007 UTC revision 73 by nigel, Sat Feb 24 21:40:30 2007 UTC
# Line 750  If we use atomic grouping for the previo Line 750  If we use atomic grouping for the previo
750  immediately on failing to match "foo" the first time. The notation is a kind of  immediately on failing to match "foo" the first time. The notation is a kind of
751  special parenthesis, starting with (?> as in this example:  special parenthesis, starting with (?> as in this example:
752    
753    (?>\\d+)bar    (?>\\d+)foo
754    
755  This kind of parenthesis "locks up" the  part of the pattern it contains once  This kind of parenthesis "locks up" the  part of the pattern it contains once
756  it has matched, and a failure further into the pattern is prevented from  it has matched, and a failure further into the pattern is prevented from
# Line 1125  parentheses instead. For this, PCRE uses Line 1125  parentheses instead. For this, PCRE uses
1125  the Python syntax that PCRE uses for named parentheses (Perl does not provide  the Python syntax that PCRE uses for named parentheses (Perl does not provide
1126  named parentheses). We could rewrite the above example as follows:  named parentheses). We could rewrite the above example as follows:
1127    
1128    (?<pn> \\( ( (?>[^()]+) | (?P>pn) )* \\) )    (?P<pn> \\( ( (?>[^()]+) | (?P>pn) )* \\) )
1129    
1130  This particular example pattern contains nested unlimited repeats, and so the  This particular example pattern contains nested unlimited repeats, and so the
1131  use of atomic grouping for matching strings of non-parentheses is important  use of atomic grouping for matching strings of non-parentheses is important

Legend:
Removed from v.63  
changed lines
  Added in v.73

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12