/[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 99 by ph10, Tue Mar 6 12:27:42 2007 UTC revision 231 by ph10, Tue Sep 11 11:15:33 2007 UTC
# Line 7  Line 7 
7  <p>  <p>
8  Return to the <a href="index.html">PCRE index page</a>.  Return to the <a href="index.html">PCRE index page</a>.
9  </p>  </p>
10  <p>  <p>
11  This page is part of the PCRE HTML documentation. It was generated automatically  This page is part of the PCRE HTML documentation. It was generated automatically
12  from the original man page. If there is any nonsense in it, please consult the  from the original man page. If there is any nonsense in it, please consult the
13  man page, in case the conversion went wrong.  man page, in case the conversion went wrong.
14  <br>  <br>
15  <br><b>  <br><b>
16  DIFFERENCES BETWEEN PCRE AND PERL  DIFFERENCES BETWEEN PCRE AND PERL
17  </b><br>  </b><br>
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 128  only at the first matching position in t Line 134  only at the first matching position in t
134  options for <b>pcre_exec()</b> have no Perl equivalents.  options for <b>pcre_exec()</b> have no Perl equivalents.
135  <br>  <br>
136  <br>  <br>
137  (g) The callout facility is PCRE-specific.  (g) The \R escape sequence can be restricted to match only CR, LF, or CRLF
138    by the PCRE_BSR_ANYCRLF option.
139  <br>  <br>
140  <br>  <br>
141  (h) The partial matching facility is PCRE-specific.  (h) The callout facility is PCRE-specific.
142  <br>  <br>
143  <br>  <br>
144  (i) Patterns compiled by PCRE can be saved and re-used at a later time, even on  (i) The partial matching facility is PCRE-specific.
145    <br>
146    <br>
147    (j) Patterns compiled by PCRE can be saved and re-used at a later time, even on
148  different hosts that have the other endianness.  different hosts that have the other endianness.
149  <br>  <br>
150  <br>  <br>
151  (j) The alternative matching function (<b>pcre_dfa_exec()</b>) matches in a  (k) The alternative matching function (<b>pcre_dfa_exec()</b>) matches in a
152  different way and is not Perl-compatible.  different way and is not Perl-compatible.
153    <br>
154    <br>
155    (l) PCRE recognizes some special sequences such as (*CR) at the start of
156    a pattern that set overall options that cannot be changed within the pattern.
157  </P>  </P>
158  <br><b>  <br><b>
159  AUTHOR  AUTHOR
# Line 156  Cambridge CB2 3QH, England. Line 170  Cambridge CB2 3QH, England.
170  REVISION  REVISION
171  </b><br>  </b><br>
172  <P>  <P>
173  Last updated: 06 March 2007  Last updated: 11 September 2007
174  <br>  <br>
175  Copyright &copy; 1997-2007 University of Cambridge.  Copyright &copy; 1997-2007 University of Cambridge.
176  <br>  <br>

Legend:
Removed from v.99  
changed lines
  Added in v.231

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12