/[pcre]/code/trunk/doc/html/pcrecompat.html
ViewVC logotype

Diff of /code/trunk/doc/html/pcrecompat.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 93 by nigel, Sat Feb 24 21:41:42 2007 UTC revision 211 by ph10, Thu Aug 9 09:52:43 2007 UTC
# Line 18  DIFFERENCES BETWEEN PCRE AND PERL Line 18  DIFFERENCES BETWEEN PCRE AND PERL
18  <P>  <P>
19  This document describes the differences in the ways that PCRE and Perl handle  This document describes the differences in the ways that PCRE and Perl handle
20  regular expressions. The differences described here are mainly with respect to  regular expressions. The differences described here are mainly with respect to
21  Perl 5.8, though PCRE version 7.0 contains some features that are expected to  Perl 5.8, though PCRE versions 7.0 and later contain some features that are
22  be in the forthcoming Perl 5.10.  expected to be in the forthcoming Perl 5.10.
23  </P>  </P>
24  <P>  <P>
25  1. PCRE has only a subset of Perl's UTF-8 and Unicode support. Details of what  1. PCRE has only a subset of Perl's UTF-8 and Unicode support. Details of what
# Line 95  strings when part of a pattern is repeat Line 95  strings when part of a pattern is repeat
95  the pattern /^(a(b)?)+$/ in Perl leaves $2 unset, but in PCRE it is set to "b".  the pattern /^(a(b)?)+$/ in Perl leaves $2 unset, but in PCRE it is set to "b".
96  </P>  </P>
97  <P>  <P>
98  11. PCRE provides some extensions to the Perl regular expression facilities.  11. PCRE does support Perl 5.10's backtracking verbs (*ACCEPT), (*FAIL), (*F),
99    (*COMMIT), (*PRUNE), (*SKIP), and (*THEN), but only in the forms without an
100    argument. PCRE does not support (*MARK). If (*ACCEPT) is within capturing
101    parentheses, PCRE does not set that capture group; this is different to Perl.
102    </P>
103    <P>
104    12. PCRE provides some extensions to the Perl regular expression facilities.
105  Perl 5.10 will include new features that are not in earlier versions, some of  Perl 5.10 will include new features that are not in earlier versions, some of
106  which (such as named parentheses) have been in PCRE for some time. This list is  which (such as named parentheses) have been in PCRE for some time. This list is
107  with respect to Perl 5.10:  with respect to Perl 5.10:
# Line 111  meta-character matches only at the very Line 117  meta-character matches only at the very
117  <br>  <br>
118  <br>  <br>
119  (c) If PCRE_EXTRA is set, a backslash followed by a letter with no special  (c) If PCRE_EXTRA is set, a backslash followed by a letter with no special
120  meaning is faulted. Otherwise, like Perl, the backslash is ignored. (Perl can  meaning is faulted. Otherwise, like Perl, the backslash is quietly ignored.
121  be made to issue a warning.)  (Perl can be made to issue a warning.)
122  <br>  <br>
123  <br>  <br>
124  (d) If PCRE_UNGREEDY is set, the greediness of the repetition quantifiers is  (d) If PCRE_UNGREEDY is set, the greediness of the repetition quantifiers is
# Line 141  different hosts that have the other endi Line 147  different hosts that have the other endi
147  (j) The alternative matching function (<b>pcre_dfa_exec()</b>) matches in a  (j) The alternative matching function (<b>pcre_dfa_exec()</b>) matches in a
148  different way and is not Perl-compatible.  different way and is not Perl-compatible.
149  </P>  </P>
150    <br><b>
151    AUTHOR
152    </b><br>
153    <P>
154    Philip Hazel
155    <br>
156    University Computing Service
157    <br>
158    Cambridge CB2 3QH, England.
159    <br>
160    </P>
161    <br><b>
162    REVISION
163    </b><br>
164  <P>  <P>
165  Last updated: 28 November 2006  Last updated: 08 August 2007
166    <br>
167    Copyright &copy; 1997-2007 University of Cambridge.
168  <br>  <br>
 Copyright &copy; 1997-2006 University of Cambridge.  
169  <p>  <p>
170  Return to the <a href="index.html">PCRE index page</a>.  Return to the <a href="index.html">PCRE index page</a>.
171  </p>  </p>

Legend:
Removed from v.93  
changed lines
  Added in v.211

  ViewVC Help
Powered by ViewVC 1.1.5