46 |
built with Unicode character property support. The properties that can be |
built with Unicode character property support. The properties that can be |
47 |
tested with \ep and \eP are limited to the general category properties such as |
tested with \ep and \eP are limited to the general category properties such as |
48 |
Lu and Nd, script names such as Greek or Han, and the derived properties Any |
Lu and Nd, script names such as Greek or Han, and the derived properties Any |
49 |
and L&. |
and L&. PCRE does support the Cs (surrogate) property, which Perl does not; the |
50 |
|
Perl documentation says "Because Perl hides the need for the user to understand |
51 |
|
the internal representation of Unicode characters, there is no need to |
52 |
|
implement the somewhat messy concept of surrogates." |
53 |
.P |
.P |
54 |
7. PCRE does support the \eQ...\eE escape for quoting substrings. Characters in |
7. PCRE does support the \eQ...\eE escape for quoting substrings. Characters in |
55 |
between are treated as literals. This is slightly different from Perl in that $ |
between are treated as literals. This is slightly different from Perl in that $ |
69 |
.P |
.P |
70 |
8. Fairly obviously, PCRE does not support the (?{code}) and (??{code}) |
8. Fairly obviously, PCRE does not support the (?{code}) and (??{code}) |
71 |
constructions. However, there is support for recursive patterns. This is not |
constructions. However, there is support for recursive patterns. This is not |
72 |
available in Perl 5.8, but will be in Perl 5.10. Also, the PCRE "callout" |
available in Perl 5.8, but it is in Perl 5.10. Also, the PCRE "callout" |
73 |
feature allows an external function to be called during pattern matching. See |
feature allows an external function to be called during pattern matching. See |
74 |
the |
the |
75 |
.\" HREF |
.\" HREF |
78 |
documentation for details. |
documentation for details. |
79 |
.P |
.P |
80 |
9. Subpatterns that are called recursively or as "subroutines" are always |
9. Subpatterns that are called recursively or as "subroutines" are always |
81 |
treated as atomic groups in PCRE. This is like Python, but unlike Perl. |
treated as atomic groups in PCRE. This is like Python, but unlike Perl. There |
82 |
|
is a discussion of an example that explains this in more detail in the |
83 |
|
.\" HTML <a href="pcrepattern.html#recursiondifference"> |
84 |
|
.\" </a> |
85 |
|
section on recursion differences from Perl |
86 |
|
.\" |
87 |
|
in the |
88 |
|
.\" HREF |
89 |
|
\fBpcrecompat\fP |
90 |
|
.\" |
91 |
|
page. |
92 |
.P |
.P |
93 |
10. There are some differences that are concerned with the settings of captured |
10. There are some differences that are concerned with the settings of captured |
94 |
strings when part of a pattern is repeated. For example, matching "aba" against |
strings when part of a pattern is repeated. For example, matching "aba" against |
96 |
.P |
.P |
97 |
11. PCRE does support Perl 5.10's backtracking verbs (*ACCEPT), (*FAIL), (*F), |
11. PCRE does support Perl 5.10's backtracking verbs (*ACCEPT), (*FAIL), (*F), |
98 |
(*COMMIT), (*PRUNE), (*SKIP), and (*THEN), but only in the forms without an |
(*COMMIT), (*PRUNE), (*SKIP), and (*THEN), but only in the forms without an |
99 |
argument. PCRE does not support (*MARK). If (*ACCEPT) is within capturing |
argument. PCRE does not support (*MARK). |
|
parentheses, PCRE does not set that capture group; this is different to Perl. |
|
100 |
.P |
.P |
101 |
12. PCRE provides some extensions to the Perl regular expression facilities. |
12. PCRE provides some extensions to the Perl regular expression facilities. |
102 |
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 |
155 |
.rs |
.rs |
156 |
.sp |
.sp |
157 |
.nf |
.nf |
158 |
Last updated: 11 September 2009 |
Last updated: 18 September 2009 |
159 |
Copyright (c) 1997-2009 University of Cambridge. |
Copyright (c) 1997-2009 University of Cambridge. |
160 |
.fi |
.fi |