mirror of
https://github.com/PCRE2Project/pcre2.git
synced 2025-10-24 20:01:06 +08:00
Increase name length to 128
This commit is contained in:
@@ -27,6 +27,9 @@ example pattern is: /(((?<=123?456456|ABC)))(?<=\2)/
|
||||
(d) Made the output in standalone mode more readable.
|
||||
|
||||
(e) General code tidies.
|
||||
|
||||
3. Increase the maximum length of a name for a group from 32 to 128 because
|
||||
there is a user for whom 32 is too small.
|
||||
|
||||
|
||||
Version 10.43 16-February-2024
|
||||
|
||||
@@ -9,9 +9,9 @@ dnl The PCRE2_PRERELEASE feature is for identifying release candidates. It might
|
||||
dnl be defined as -RC2, for example. For real releases, it should be empty.
|
||||
|
||||
m4_define(pcre2_major, [10])
|
||||
m4_define(pcre2_minor, [43])
|
||||
m4_define(pcre2_prerelease, [])
|
||||
m4_define(pcre2_date, [2024-02-16])
|
||||
m4_define(pcre2_minor, [44])
|
||||
m4_define(pcre2_prerelease, [-DEV])
|
||||
m4_define(pcre2_date, [2024-03-11])
|
||||
|
||||
# Libtool shared library interface versions (current:revision:age)
|
||||
m4_define(libpcre2_8_version, [12:0:12])
|
||||
@@ -883,7 +883,7 @@ AC_DEFINE_UNQUOTED([HEAP_LIMIT], [$with_heap_limit], [
|
||||
a pattern. It applies to both pcre2_match() and pcre2_dfa_match(). It does
|
||||
not apply to JIT matching. The value is in kibibytes (units of 1024 bytes).])
|
||||
|
||||
AC_DEFINE([MAX_NAME_SIZE], [32], [
|
||||
AC_DEFINE([MAX_NAME_SIZE], [128], [
|
||||
This limit is parameterized just in case anybody ever wants to
|
||||
change it. Care must be taken if it is increased, because it guards
|
||||
against integer overflow caused by enormously large patterns.])
|
||||
|
||||
@@ -1843,7 +1843,7 @@ using the Python syntax. PCRE2 supports both the Perl and the Python syntax.
|
||||
</P>
|
||||
<P>
|
||||
In PCRE2, a capture group can be named in one of three ways: (?<name>...) or
|
||||
(?'name'...) as in Perl, or (?P<name>...) as in Python. Names may be up to 32
|
||||
(?'name'...) as in Perl, or (?P<name>...) as in Python. Names may be up to 128
|
||||
code units long. When PCRE2_UTF is not set, they may contain only ASCII
|
||||
alphanumeric characters and underscores, but must start with a non-digit. When
|
||||
PCRE2_UTF is set, the syntax of group names is extended to allow any Unicode
|
||||
@@ -3844,7 +3844,7 @@ Cambridge, England.
|
||||
</P>
|
||||
<br><a name="SEC32" href="#TOC1">REVISION</a><br>
|
||||
<P>
|
||||
Last updated: 19 January 2024
|
||||
Last updated: 11 March 2024
|
||||
<br>
|
||||
Copyright © 1997-2024 University of Cambridge.
|
||||
<br>
|
||||
|
||||
1466
doc/pcre2.txt
1466
doc/pcre2.txt
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
.TH PCRE2DEMO 3 "21 February 2024" "PCRE2 10.43"
|
||||
.TH PCRE2DEMO 3 "11 March 2024" "PCRE2 10.43"
|
||||
.\"AUTOMATICALLY GENERATED BY PrepareRelease - do not EDIT!
|
||||
.SH NAME
|
||||
PCRE2DEMO - A demonstration C program for PCRE2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH PCRE2PATTERN 3 "19 January 2024" "PCRE2 10.43"
|
||||
.TH PCRE2PATTERN 3 "11 March 2024" "PCRE2 10.44"
|
||||
.SH NAME
|
||||
PCRE2 - Perl-compatible regular expressions (revised API)
|
||||
.SH "PCRE2 REGULAR EXPRESSION DETAILS"
|
||||
@@ -1844,7 +1844,7 @@ the naming of capture groups. This feature was not added to Perl until release
|
||||
using the Python syntax. PCRE2 supports both the Perl and the Python syntax.
|
||||
.P
|
||||
In PCRE2, a capture group can be named in one of three ways: (?<name>...) or
|
||||
(?'name'...) as in Perl, or (?P<name>...) as in Python. Names may be up to 32
|
||||
(?'name'...) as in Perl, or (?P<name>...) as in Python. Names may be up to 128
|
||||
code units long. When PCRE2_UTF is not set, they may contain only ASCII
|
||||
alphanumeric characters and underscores, but must start with a non-digit. When
|
||||
PCRE2_UTF is set, the syntax of group names is extended to allow any Unicode
|
||||
@@ -3889,6 +3889,6 @@ Cambridge, England.
|
||||
.rs
|
||||
.sp
|
||||
.nf
|
||||
Last updated: 19 January 2024
|
||||
Last updated: 11 March 2024
|
||||
Copyright (c) 1997-2024 University of Cambridge.
|
||||
.fi
|
||||
|
||||
6
testdata/testinput10
vendored
6
testdata/testinput10
vendored
@@ -487,11 +487,11 @@
|
||||
|
||||
# Check name length with non-ASCII characters
|
||||
|
||||
/(?'ABáC678901234567890123456789012'...)/utf
|
||||
/(?'ABáC678901234567890123456789012012345678901234567890123456789AB012345678901234567890123456789AB012345678901234567890123456789AB'...)/utf
|
||||
|
||||
/(?'ABáC6789012345678901234567890123'...)/utf
|
||||
/(?'ABáC6789012345678901234567890123012345678901234567890123456789AB012345678901234567890123456789AB012345678901234567890123456789AB'...)/utf
|
||||
|
||||
/(?'ABZC6789012345678901234567890123'...)/utf
|
||||
/(?'ABZC6789012345678901234567890123012345678901234567890123456789AB012345678901234567890123456789AB012345678901234567890123456789AB'...)/utf
|
||||
|
||||
/(?(n/utf
|
||||
|
||||
|
||||
6
testdata/testinput2
vendored
6
testdata/testinput2
vendored
@@ -4680,9 +4680,9 @@ B)x/alt_verbnames,mark
|
||||
/(?<=\K.)/g,replace=-,allow_lookaround_bsk
|
||||
ab
|
||||
|
||||
/(?'abcdefghijklmnopqrstuvwxyzABCDEFG'toolong)/
|
||||
/(?'abcdefghijklmnopqrstuvwxyzABCDEFGabcdefghijklmnopqrstuvwxyzABCDEabcdefghijklmnopqrstuvwxyzABCDEabcdefghijklmnopqrstuvwxyzABCDEFGH'toolong)/
|
||||
|
||||
/(?'abcdefghijklmnopqrstuvwxyzABCDEF'justright)/
|
||||
/(?'abcdefghijklmnopqrstuvwxyzABCDEFGabcdefghijklmnopqrstuvwxyzABCDEabcdefghijklmnopqrstuvwxyzABCDEabcdefghijklmnopqrstuvwxyzABCDEFG'justright)/
|
||||
|
||||
# These two use zero-termination
|
||||
/abcd/max_pattern_length=3
|
||||
@@ -4949,7 +4949,7 @@ a)"xI
|
||||
/{<7B>̈́<EFBFBD>̈́<EFBFBD>{'{22{2{{2{'{22{{22{2{'{22{2{{2{{222{{2{'{22{2{22{2{'{22{2{{2{'{22{2{22{2{'{'{22{2{22{2{'{22{2{{2{'{22{2{22{2{'{222{2Ą̈́<C484>̈́<EFBFBD>{'{22{2{{2{'{22{{11{2{'{22{2{{2{{'{22{2{{2{'{22{{22{1{'{22{2{{2{{222{{2{'{22{2{22{2{'{/auto_callout
|
||||
|
||||
//
|
||||
\=get=i00000000000000000000000000000000
|
||||
\=get=i00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
\=get=i2345678901234567890123456789012,get=i1245678901234567890123456789012
|
||||
|
||||
"(?(?C))"
|
||||
|
||||
8
testdata/testoutput10
vendored
8
testdata/testoutput10
vendored
@@ -1615,12 +1615,12 @@ No match
|
||||
|
||||
# Check name length with non-ASCII characters
|
||||
|
||||
/(?'ABáC678901234567890123456789012'...)/utf
|
||||
/(?'ABáC678901234567890123456789012012345678901234567890123456789AB012345678901234567890123456789AB012345678901234567890123456789AB'...)/utf
|
||||
|
||||
/(?'ABáC6789012345678901234567890123'...)/utf
|
||||
Failed: error 148 at offset 36: subpattern name is too long (maximum 32 code units)
|
||||
/(?'ABáC6789012345678901234567890123012345678901234567890123456789AB012345678901234567890123456789AB012345678901234567890123456789AB'...)/utf
|
||||
Failed: error 148 at offset 132: subpattern name is too long (maximum 128 code units)
|
||||
|
||||
/(?'ABZC6789012345678901234567890123'...)/utf
|
||||
/(?'ABZC6789012345678901234567890123012345678901234567890123456789AB012345678901234567890123456789AB012345678901234567890123456789AB'...)/utf
|
||||
|
||||
/(?(n/utf
|
||||
Failed: error 142 at offset 4: syntax error in subpattern name (missing terminator?)
|
||||
|
||||
8
testdata/testoutput2
vendored
8
testdata/testoutput2
vendored
@@ -14935,10 +14935,10 @@ Failed: error -60: match with end before start or start moved backwards is not s
|
||||
ab
|
||||
Failed: error -60: match with end before start or start moved backwards is not supported
|
||||
|
||||
/(?'abcdefghijklmnopqrstuvwxyzABCDEFG'toolong)/
|
||||
Failed: error 148 at offset 36: subpattern name is too long (maximum 32 code units)
|
||||
/(?'abcdefghijklmnopqrstuvwxyzABCDEFGabcdefghijklmnopqrstuvwxyzABCDEabcdefghijklmnopqrstuvwxyzABCDEabcdefghijklmnopqrstuvwxyzABCDEFGH'toolong)/
|
||||
Failed: error 148 at offset 132: subpattern name is too long (maximum 128 code units)
|
||||
|
||||
/(?'abcdefghijklmnopqrstuvwxyzABCDEF'justright)/
|
||||
/(?'abcdefghijklmnopqrstuvwxyzABCDEFGabcdefghijklmnopqrstuvwxyzABCDEabcdefghijklmnopqrstuvwxyzABCDEabcdefghijklmnopqrstuvwxyzABCDEFG'justright)/
|
||||
|
||||
# These two use zero-termination
|
||||
/abcd/max_pattern_length=3
|
||||
@@ -15549,7 +15549,7 @@ Failed: error 157 at offset 6: \g is not followed by a braced, angle-bracketed,
|
||||
/{<7B>̈́<EFBFBD>̈́<EFBFBD>{'{22{2{{2{'{22{{22{2{'{22{2{{2{{222{{2{'{22{2{22{2{'{22{2{{2{'{22{2{22{2{'{'{22{2{22{2{'{22{2{{2{'{22{2{22{2{'{222{2Ą̈́<C484>̈́<EFBFBD>{'{22{2{{2{'{22{{11{2{'{22{2{{2{{'{22{2{{2{'{22{{22{1{'{22{2{{2{{222{{2{'{22{2{22{2{'{/auto_callout
|
||||
|
||||
//
|
||||
\=get=i00000000000000000000000000000000
|
||||
\=get=i00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
** Group name in 'get' is too long
|
||||
\=get=i2345678901234567890123456789012,get=i1245678901234567890123456789012
|
||||
** Too many characters in named 'get' modifiers
|
||||
|
||||
Reference in New Issue
Block a user