Documentation update.
This commit is contained in:
parent
79bbc574a0
commit
2b2074c915
|
@ -18,7 +18,7 @@ DIFFERENCES BETWEEN PCRE2 AND PERL
|
||||||
<P>
|
<P>
|
||||||
This document describes the differences in the ways that PCRE2 and Perl handle
|
This document describes the differences in the ways that PCRE2 and Perl handle
|
||||||
regular expressions. The differences described here are with respect to Perl
|
regular expressions. The differences described here are with respect to Perl
|
||||||
versions 5.24, but as both Perl and PCRE2 are continually changing, the
|
versions 5.26, but as both Perl and PCRE2 are continually changing, the
|
||||||
information may sometimes be out of date.
|
information may sometimes be out of date.
|
||||||
</P>
|
</P>
|
||||||
<P>
|
<P>
|
||||||
|
@ -148,7 +148,7 @@ letters, regardless of case, when case independence is specified.
|
||||||
17. PCRE2 provides some extensions to the Perl regular expression facilities.
|
17. PCRE2 provides some extensions to the Perl regular expression facilities.
|
||||||
Perl 5.10 includes new features that are not in earlier versions of Perl, some
|
Perl 5.10 includes new features that are not in earlier versions of Perl, some
|
||||||
of which (such as named parentheses) were in PCRE2 for some time before. This
|
of which (such as named parentheses) were in PCRE2 for some time before. This
|
||||||
list is with respect to Perl 5.24:
|
list is with respect to Perl 5.26:
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
(a) Although lookbehind assertions in PCRE2 must match fixed length strings,
|
(a) Although lookbehind assertions in PCRE2 must match fixed length strings,
|
||||||
|
@ -178,15 +178,16 @@ question mark they are.
|
||||||
only at the first matching position in the subject string.
|
only at the first matching position in the subject string.
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
(g) The PCRE2_NOTBOL, PCRE2_NOTEOL, PCRE2_NOTEMPTY, PCRE2_NOTEMPTY_ATSTART, and
|
(g) The PCRE2_NOTBOL, PCRE2_NOTEOL, PCRE2_NOTEMPTY and PCRE2_NOTEMPTY_ATSTART
|
||||||
PCRE2_NO_AUTO_CAPTURE options have no Perl equivalents.
|
options have no Perl equivalents.
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
(h) The \R escape sequence can be restricted to match only CR, LF, or CRLF
|
(h) The \R escape sequence can be restricted to match only CR, LF, or CRLF
|
||||||
by the PCRE2_BSR_ANYCRLF option.
|
by the PCRE2_BSR_ANYCRLF option.
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
(i) The callout facility is PCRE2-specific.
|
(i) The callout facility is PCRE2-specific. Perl supports codeblocks and
|
||||||
|
variable interpolation, but not general hooks on every match.
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
(j) The partial matching facility is PCRE2-specific.
|
(j) The partial matching facility is PCRE2-specific.
|
||||||
|
@ -196,8 +197,25 @@ by the PCRE2_BSR_ANYCRLF option.
|
||||||
different way and is not Perl-compatible.
|
different way and is not Perl-compatible.
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
(l) PCRE2 recognizes some special sequences such as (*CR) at the start of
|
(l) PCRE2 recognizes some special sequences such as (*CR) or (*NO_JIT) at
|
||||||
a pattern that set overall options that cannot be changed within the pattern.
|
the start of a pattern that set overall options that cannot be changed within
|
||||||
|
the pattern.
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
18. The following new Perl 5.26 constructs are not yet supported in PCRE2:
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
(a) The Perl /a modifier restricts /d numbers to pure ascii, the new /aa
|
||||||
|
modifier restricts /i case-insensitive matching to pure ascii also, ignoring
|
||||||
|
unicode rules. This separation cannot be represented with PCRE2_UTF.
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
19. Perl has different limits than PCRE2. See the
|
||||||
|
<a href="pcre2limit.html"><b>pcre2limit</b></a>
|
||||||
|
documentation for details. Perl went with 5.10 from recursion to iteration
|
||||||
|
keeping the intermediate matches on the heap, which is ~10% slower but does not
|
||||||
|
fall into any stack-overflow limit. PCRE2 made a similar change at release
|
||||||
|
10.30, and also has many build-time and run-time customizable limits.
|
||||||
</P>
|
</P>
|
||||||
<br><b>
|
<br><b>
|
||||||
AUTHOR
|
AUTHOR
|
||||||
|
@ -214,7 +232,7 @@ Cambridge, England.
|
||||||
REVISION
|
REVISION
|
||||||
</b><br>
|
</b><br>
|
||||||
<P>
|
<P>
|
||||||
Last updated: 03 April 2017
|
Last updated: 17 April 2017
|
||||||
<br>
|
<br>
|
||||||
Copyright © 1997-2017 University of Cambridge.
|
Copyright © 1997-2017 University of Cambridge.
|
||||||
<br>
|
<br>
|
||||||
|
|
|
@ -4203,7 +4203,7 @@ DIFFERENCES BETWEEN PCRE2 AND PERL
|
||||||
|
|
||||||
This document describes the differences in the ways that PCRE2 and Perl
|
This document describes the differences in the ways that PCRE2 and Perl
|
||||||
handle regular expressions. The differences described here are with
|
handle regular expressions. The differences described here are with
|
||||||
respect to Perl versions 5.24, but as both Perl and PCRE2 are continu-
|
respect to Perl versions 5.26, but as both Perl and PCRE2 are continu-
|
||||||
ally changing, the information may sometimes be out of date.
|
ally changing, the information may sometimes be out of date.
|
||||||
|
|
||||||
1. PCRE2 has only a subset of Perl's Unicode support. Details of what
|
1. PCRE2 has only a subset of Perl's Unicode support. Details of what
|
||||||
|
@ -4320,7 +4320,7 @@ DIFFERENCES BETWEEN PCRE2 AND PERL
|
||||||
17. PCRE2 provides some extensions to the Perl regular expression
|
17. PCRE2 provides some extensions to the Perl regular expression
|
||||||
facilities. Perl 5.10 includes new features that are not in earlier
|
facilities. Perl 5.10 includes new features that are not in earlier
|
||||||
versions of Perl, some of which (such as named parentheses) were in
|
versions of Perl, some of which (such as named parentheses) were in
|
||||||
PCRE2 for some time before. This list is with respect to Perl 5.24:
|
PCRE2 for some time before. This list is with respect to Perl 5.26:
|
||||||
|
|
||||||
(a) Although lookbehind assertions in PCRE2 must match fixed length
|
(a) Although lookbehind assertions in PCRE2 must match fixed length
|
||||||
strings, each alternative branch of a lookbehind assertion can match a
|
strings, each alternative branch of a lookbehind assertion can match a
|
||||||
|
@ -4345,23 +4345,38 @@ DIFFERENCES BETWEEN PCRE2 AND PERL
|
||||||
(f) PCRE2_ANCHORED can be used at matching time to force a pattern to
|
(f) PCRE2_ANCHORED can be used at matching time to force a pattern to
|
||||||
be tried only at the first matching position in the subject string.
|
be tried only at the first matching position in the subject string.
|
||||||
|
|
||||||
(g) The PCRE2_NOTBOL, PCRE2_NOTEOL, PCRE2_NOTEMPTY,
|
(g) The PCRE2_NOTBOL, PCRE2_NOTEOL, PCRE2_NOTEMPTY and
|
||||||
PCRE2_NOTEMPTY_ATSTART, and PCRE2_NO_AUTO_CAPTURE options have no Perl
|
PCRE2_NOTEMPTY_ATSTART options have no Perl equivalents.
|
||||||
equivalents.
|
|
||||||
|
|
||||||
(h) The \R escape sequence can be restricted to match only CR, LF, or
|
(h) The \R escape sequence can be restricted to match only CR, LF, or
|
||||||
CRLF by the PCRE2_BSR_ANYCRLF option.
|
CRLF by the PCRE2_BSR_ANYCRLF option.
|
||||||
|
|
||||||
(i) The callout facility is PCRE2-specific.
|
(i) The callout facility is PCRE2-specific. Perl supports codeblocks
|
||||||
|
and variable interpolation, but not general hooks on every match.
|
||||||
|
|
||||||
(j) The partial matching facility is PCRE2-specific.
|
(j) The partial matching facility is PCRE2-specific.
|
||||||
|
|
||||||
(k) The alternative matching function (pcre2_dfa_match() matches in a
|
(k) The alternative matching function (pcre2_dfa_match() matches in a
|
||||||
different way and is not Perl-compatible.
|
different way and is not Perl-compatible.
|
||||||
|
|
||||||
(l) PCRE2 recognizes some special sequences such as (*CR) at the start
|
(l) PCRE2 recognizes some special sequences such as (*CR) or (*NO_JIT)
|
||||||
of a pattern that set overall options that cannot be changed within the
|
at the start of a pattern that set overall options that cannot be
|
||||||
pattern.
|
changed within the pattern.
|
||||||
|
|
||||||
|
18. The following new Perl 5.26 constructs are not yet supported in
|
||||||
|
PCRE2:
|
||||||
|
|
||||||
|
(a) The Perl /a modifier restricts /d numbers to pure ascii, the new
|
||||||
|
/aa modifier restricts /i case-insensitive matching to pure ascii also,
|
||||||
|
ignoring unicode rules. This separation cannot be represented with
|
||||||
|
PCRE2_UTF.
|
||||||
|
|
||||||
|
19. Perl has different limits than PCRE2. See the pcre2limit documenta-
|
||||||
|
tion for details. Perl went with 5.10 from recursion to iteration keep-
|
||||||
|
ing the intermediate matches on the heap, which is ~10% slower but does
|
||||||
|
not fall into any stack-overflow limit. PCRE2 made a similar change at
|
||||||
|
release 10.30, and also has many build-time and run-time customizable
|
||||||
|
limits.
|
||||||
|
|
||||||
|
|
||||||
AUTHOR
|
AUTHOR
|
||||||
|
@ -4373,7 +4388,7 @@ AUTHOR
|
||||||
|
|
||||||
REVISION
|
REVISION
|
||||||
|
|
||||||
Last updated: 03 April 2017
|
Last updated: 17 April 2017
|
||||||
Copyright (c) 1997-2017 University of Cambridge.
|
Copyright (c) 1997-2017 University of Cambridge.
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.TH PCRE2COMPAT 3 "03 April 2017" "PCRE2 10.30"
|
.TH PCRE2COMPAT 3 "17 April 2017" "PCRE2 10.30"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
PCRE2 - Perl-compatible regular expressions (revised API)
|
PCRE2 - Perl-compatible regular expressions (revised API)
|
||||||
.SH "DIFFERENCES BETWEEN PCRE2 AND PERL"
|
.SH "DIFFERENCES BETWEEN PCRE2 AND PERL"
|
||||||
|
@ -6,7 +6,7 @@ PCRE2 - Perl-compatible regular expressions (revised API)
|
||||||
.sp
|
.sp
|
||||||
This document describes the differences in the ways that PCRE2 and Perl handle
|
This document describes the differences in the ways that PCRE2 and Perl handle
|
||||||
regular expressions. The differences described here are with respect to Perl
|
regular expressions. The differences described here are with respect to Perl
|
||||||
versions 5.24, but as both Perl and PCRE2 are continually changing, the
|
versions 5.26, but as both Perl and PCRE2 are continually changing, the
|
||||||
information may sometimes be out of date.
|
information may sometimes be out of date.
|
||||||
.P
|
.P
|
||||||
1. PCRE2 has only a subset of Perl's Unicode support. Details of what it does
|
1. PCRE2 has only a subset of Perl's Unicode support. Details of what it does
|
||||||
|
@ -125,7 +125,7 @@ letters, regardless of case, when case independence is specified.
|
||||||
17. PCRE2 provides some extensions to the Perl regular expression facilities.
|
17. PCRE2 provides some extensions to the Perl regular expression facilities.
|
||||||
Perl 5.10 includes new features that are not in earlier versions of Perl, some
|
Perl 5.10 includes new features that are not in earlier versions of Perl, some
|
||||||
of which (such as named parentheses) were in PCRE2 for some time before. This
|
of which (such as named parentheses) were in PCRE2 for some time before. This
|
||||||
list is with respect to Perl 5.24:
|
list is with respect to Perl 5.26:
|
||||||
.sp
|
.sp
|
||||||
(a) Although lookbehind assertions in PCRE2 must match fixed length strings,
|
(a) Although lookbehind assertions in PCRE2 must match fixed length strings,
|
||||||
each alternative branch of a lookbehind assertion can match a different length
|
each alternative branch of a lookbehind assertion can match a different length
|
||||||
|
@ -148,21 +148,38 @@ question mark they are.
|
||||||
(f) PCRE2_ANCHORED can be used at matching time to force a pattern to be tried
|
(f) PCRE2_ANCHORED can be used at matching time to force a pattern to be tried
|
||||||
only at the first matching position in the subject string.
|
only at the first matching position in the subject string.
|
||||||
.sp
|
.sp
|
||||||
(g) The PCRE2_NOTBOL, PCRE2_NOTEOL, PCRE2_NOTEMPTY, PCRE2_NOTEMPTY_ATSTART, and
|
(g) The PCRE2_NOTBOL, PCRE2_NOTEOL, PCRE2_NOTEMPTY and PCRE2_NOTEMPTY_ATSTART
|
||||||
PCRE2_NO_AUTO_CAPTURE options have no Perl equivalents.
|
options have no Perl equivalents.
|
||||||
.sp
|
.sp
|
||||||
(h) The \eR escape sequence can be restricted to match only CR, LF, or CRLF
|
(h) The \eR escape sequence can be restricted to match only CR, LF, or CRLF
|
||||||
by the PCRE2_BSR_ANYCRLF option.
|
by the PCRE2_BSR_ANYCRLF option.
|
||||||
.sp
|
.sp
|
||||||
(i) The callout facility is PCRE2-specific.
|
(i) The callout facility is PCRE2-specific. Perl supports codeblocks and
|
||||||
|
variable interpolation, but not general hooks on every match.
|
||||||
.sp
|
.sp
|
||||||
(j) The partial matching facility is PCRE2-specific.
|
(j) The partial matching facility is PCRE2-specific.
|
||||||
.sp
|
.sp
|
||||||
(k) The alternative matching function (\fBpcre2_dfa_match()\fP matches in a
|
(k) The alternative matching function (\fBpcre2_dfa_match()\fP matches in a
|
||||||
different way and is not Perl-compatible.
|
different way and is not Perl-compatible.
|
||||||
.sp
|
.sp
|
||||||
(l) PCRE2 recognizes some special sequences such as (*CR) at the start of
|
(l) PCRE2 recognizes some special sequences such as (*CR) or (*NO_JIT) at
|
||||||
a pattern that set overall options that cannot be changed within the pattern.
|
the start of a pattern that set overall options that cannot be changed within
|
||||||
|
the pattern.
|
||||||
|
.sp
|
||||||
|
18. The following new Perl 5.26 constructs are not yet supported in PCRE2:
|
||||||
|
.sp
|
||||||
|
(a) The Perl /a modifier restricts /d numbers to pure ascii, the new /aa
|
||||||
|
modifier restricts /i case-insensitive matching to pure ascii also, ignoring
|
||||||
|
unicode rules. This separation cannot be represented with PCRE2_UTF.
|
||||||
|
.sp
|
||||||
|
19. Perl has different limits than PCRE2. See the
|
||||||
|
.\" HREF
|
||||||
|
\fBpcre2limit\fP
|
||||||
|
.\"
|
||||||
|
documentation for details. Perl went with 5.10 from recursion to iteration
|
||||||
|
keeping the intermediate matches on the heap, which is ~10% slower but does not
|
||||||
|
fall into any stack-overflow limit. PCRE2 made a similar change at release
|
||||||
|
10.30, and also has many build-time and run-time customizable limits.
|
||||||
.
|
.
|
||||||
.
|
.
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
|
@ -179,6 +196,6 @@ Cambridge, England.
|
||||||
.rs
|
.rs
|
||||||
.sp
|
.sp
|
||||||
.nf
|
.nf
|
||||||
Last updated: 03 April 2017
|
Last updated: 17 April 2017
|
||||||
Copyright (c) 1997-2017 University of Cambridge.
|
Copyright (c) 1997-2017 University of Cambridge.
|
||||||
.fi
|
.fi
|
||||||
|
|
Loading…
Reference in New Issue