/[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 1341 by ph10, Fri Jun 28 15:07:57 2013 UTC revision 1361 by ph10, Fri Sep 6 17:47:32 2013 UTC
# Line 1  Line 1 
1  .TH PCREPATTERN 3 "26 April 2013" "PCRE 8.33"  .TH PCREPATTERN 3 "06 September 2013" "PCRE 8.34"
2  .SH NAME  .SH NAME
3  PCRE - Perl-compatible regular expressions  PCRE - Perl-compatible regular expressions
4  .SH "PCRE REGULAR EXPRESSION DETAILS"  .SH "PCRE REGULAR EXPRESSION DETAILS"
# Line 1577  for the first (and in this example, the Line 1577  for the first (and in this example, the
1577  matched. This saves searching to find which numbered subpattern it was.  matched. This saves searching to find which numbered subpattern it was.
1578  .P  .P
1579  If you make a back reference to a non-unique named subpattern from elsewhere in  If you make a back reference to a non-unique named subpattern from elsewhere in
1580  the pattern, the one that corresponds to the first occurrence of the name is  the pattern, the subpatterns to which the name refers are checked in the order
1581  used. In the absence of duplicate numbers (see the previous section) this is  in which they appear in the overall pattern. The first one that is set is used
1582  the one with the lowest number. If you use a named reference in a condition  for the reference. For example, this pattern matches both "foofoo" and
1583    "barbar" but not "foobar" or "barfoo":
1584    .sp
1585      (?:(?<n>foo)|(?<n>bar))\k<n>
1586    .sp
1587    .P
1588    If you make a subroutine call to a non-unique named subpattern, the one that
1589    corresponds to the first occurrence of the name is used. In the absence of
1590    duplicate numbers (see the previous section) this is the one with the lowest
1591    number.
1592    .P
1593    If you use a named reference in a condition
1594  test (see the  test (see the
1595  .\"  .\"
1596  .\" HTML <a href="#conditions">  .\" HTML <a href="#conditions">
# Line 1599  documentation. Line 1610  documentation.
1610  \fBWarning:\fP You cannot use different names to distinguish between two  \fBWarning:\fP You cannot use different names to distinguish between two
1611  subpatterns with the same number because PCRE uses only the numbers when  subpatterns with the same number because PCRE uses only the numbers when
1612  matching. For this reason, an error is given at compile time if different names  matching. For this reason, an error is given at compile time if different names
1613  are given to subpatterns with the same number. However, you can give the same  are given to subpatterns with the same number. However, you can always give the
1614  name to subpatterns with the same number, even when PCRE_DUPNAMES is not set.  same name to subpatterns with the same number, even when PCRE_DUPNAMES is not
1615    set.
1616  .  .
1617  .  .
1618  .SH REPETITION  .SH REPETITION
# Line 3145  Cambridge CB2 3QH, England. Line 3157  Cambridge CB2 3QH, England.
3157  .rs  .rs
3158  .sp  .sp
3159  .nf  .nf
3160  Last updated: 26 April 2013  Last updated: 06 September 2013
3161  Copyright (c) 1997-2013 University of Cambridge.  Copyright (c) 1997-2013 University of Cambridge.
3162  .fi  .fi

Legend:
Removed from v.1341  
changed lines
  Added in v.1361

  ViewVC Help
Powered by ViewVC 1.1.5