7 |
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 |
8 |
regular expressions. The differences described here are mainly with respect to |
regular expressions. The differences described here are mainly with respect to |
9 |
Perl 5.8, though PCRE versions 7.0 and later contain some features that are |
Perl 5.8, though PCRE versions 7.0 and later contain some features that are |
10 |
expected to be in the forthcoming Perl 5.10. |
in Perl 5.10. |
11 |
.P |
.P |
12 |
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 |
13 |
it does have are given in the |
it does have are given in the |
83 |
.P |
.P |
84 |
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), |
85 |
(*COMMIT), (*PRUNE), (*SKIP), and (*THEN), but only in the forms without an |
(*COMMIT), (*PRUNE), (*SKIP), and (*THEN), but only in the forms without an |
86 |
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. |
|
87 |
.P |
.P |
88 |
12. PCRE provides some extensions to the Perl regular expression facilities. |
12. PCRE provides some extensions to the Perl regular expression facilities. |
89 |
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 |
108 |
(e) PCRE_ANCHORED can be used at matching time to force a pattern to be tried |
(e) PCRE_ANCHORED can be used at matching time to force a pattern to be tried |
109 |
only at the first matching position in the subject string. |
only at the first matching position in the subject string. |
110 |
.sp |
.sp |
111 |
(f) The PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, and PCRE_NO_AUTO_CAPTURE |
(f) The PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART, and |
112 |
options for \fBpcre_exec()\fP have no Perl equivalents. |
PCRE_NO_AUTO_CAPTURE options for \fBpcre_exec()\fP have no Perl equivalents. |
113 |
.sp |
.sp |
114 |
(g) The \eR escape sequence can be restricted to match only CR, LF, or CRLF |
(g) The \eR escape sequence can be restricted to match only CR, LF, or CRLF |
115 |
by the PCRE_BSR_ANYCRLF option. |
by the PCRE_BSR_ANYCRLF option. |
142 |
.rs |
.rs |
143 |
.sp |
.sp |
144 |
.nf |
.nf |
145 |
Last updated: 11 September 2007 |
Last updated: 15 September 2009 |
146 |
Copyright (c) 1997-2007 University of Cambridge. |
Copyright (c) 1997-2009 University of Cambridge. |
147 |
.fi |
.fi |