/[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 1405 by ph10, Mon Nov 25 15:09:21 2013 UTC revision 1408 by ph10, Tue Dec 3 16:27:00 2013 UTC
# Line 1  Line 1 
1  .TH PCREPATTERN 3 "25 November 2013" "PCRE 8.34"  .TH PCREPATTERN 3 "03 December 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 1313  something AND NOT ...". Line 1313  something AND NOT ...".
1313  The only metacharacters that are recognized in character classes are backslash,  The only metacharacters that are recognized in character classes are backslash,
1314  hyphen (only where it can be interpreted as specifying a range), circumflex  hyphen (only where it can be interpreted as specifying a range), circumflex
1315  (only at the start), opening square bracket (only when it can be interpreted as  (only at the start), opening square bracket (only when it can be interpreted as
1316  introducing a POSIX class name - see the next section), and the terminating  introducing a POSIX class name, or for a special compatibility feature - see
1317  closing square bracket. However, escaping other non-alphanumeric characters  the next two sections), and the terminating closing square bracket. However,
1318  does no harm.  escaping other non-alphanumeric characters does no harm.
1319  .  .
1320  .  .
1321  .SH "POSIX CHARACTER CLASSES"  .SH "POSIX CHARACTER CLASSES"
# Line 1403  The other POSIX classes are unchanged, a Line 1403  The other POSIX classes are unchanged, a
1403  points less than 128.  points less than 128.
1404  .  .
1405  .  .
1406    .SH "COMPATIBILITY FEATURE FOR WORD BOUNDARIES"
1407    .rs
1408    .sp
1409    In the POSIX.2 compliant library that was included in 4.4BSD Unix, the ugly
1410    syntax [[:<:]] and [[:>:]] is used for matching "start of word" and "end of
1411    word". PCRE treats these items as follows:
1412    .sp
1413      [[:<:]]  is converted to  \eb(?=\ew)
1414      [[:>:]]  is converted to  \eb(?<=\ew)
1415    .sp
1416    Only these exact character sequences are recognized. A sequence such as
1417    [a[:<:]b] provokes error for an unrecognized POSIX class name. This support is
1418    not compatible with Perl. It is provided to help migrations from other
1419    environments, and is best not used in any new patterns. Note that \eb matches
1420    at the start and the end of a word (see
1421    .\" HTML <a href="#smallassertions">
1422    .\" </a>
1423    "Simple assertions"
1424    .\"
1425    above), and in a Perl-style pattern the preceding or following character
1426    normally shows which is wanted, without the need for the assertions that are
1427    used above in order to give exactly the POSIX behaviour.
1428    .
1429    .
1430  .SH "VERTICAL BAR"  .SH "VERTICAL BAR"
1431  .rs  .rs
1432  .sp  .sp
# Line 3231  Cambridge CB2 3QH, England. Line 3255  Cambridge CB2 3QH, England.
3255  .rs  .rs
3256  .sp  .sp
3257  .nf  .nf
3258  Last updated: 25 November 2013  Last updated: 03 December 2013
3259  Copyright (c) 1997-2013 University of Cambridge.  Copyright (c) 1997-2013 University of Cambridge.
3260  .fi  .fi

Legend:
Removed from v.1405  
changed lines
  Added in v.1408

  ViewVC Help
Powered by ViewVC 1.1.5