Documentation and tests update.
This commit is contained in:
parent
d36fb8884b
commit
1cf10f71c5
15
doc/pcre2.3
15
doc/pcre2.3
@ -1,4 +1,4 @@
|
|||||||
.TH PCRE2 3 "17 September 2018" "PCRE2 10.33"
|
.TH PCRE2 3 "28 April 2021" "PCRE2 10.37"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
PCRE2 - Perl-compatible regular expressions (revised API)
|
PCRE2 - Perl-compatible regular expressions (revised API)
|
||||||
.SH INTRODUCTION
|
.SH INTRODUCTION
|
||||||
@ -19,8 +19,13 @@ using the Python syntax. There is also some support for one or two .NET and
|
|||||||
Oniguruma syntax items, and there are options for requesting some minor changes
|
Oniguruma syntax items, and there are options for requesting some minor changes
|
||||||
that give better ECMAScript (aka JavaScript) compatibility.
|
that give better ECMAScript (aka JavaScript) compatibility.
|
||||||
.P
|
.P
|
||||||
The source code for PCRE2 can be compiled to support 8-bit, 16-bit, or 32-bit
|
The source code for PCRE2 can be compiled to support strings of 8-bit, 16-bit,
|
||||||
code units, which means that up to three separate libraries may be installed.
|
or 32-bit code units, which means that up to three separate libraries may be
|
||||||
|
installed, one for each code unit size. The size of code unit is not related to
|
||||||
|
the bit size of the underlying hardware. In a 64-bit environment that also
|
||||||
|
supports 32-bit applications, versions of PCRE2 that are compiled in both
|
||||||
|
64-bit and 32-bit modes may be needed.
|
||||||
|
.P
|
||||||
The original work to extend PCRE to 16-bit and 32-bit code units was done by
|
The original work to extend PCRE to 16-bit and 32-bit code units was done by
|
||||||
Zoltan Herczeg and Christian Persch, respectively. In all three cases, strings
|
Zoltan Herczeg and Christian Persch, respectively. In all three cases, strings
|
||||||
can be interpreted either as one character per code unit, or as UTF-encoded
|
can be interpreted either as one character per code unit, or as UTF-encoded
|
||||||
@ -197,6 +202,6 @@ use my two initials, followed by the two digits 10, at the domain cam.ac.uk.
|
|||||||
.rs
|
.rs
|
||||||
.sp
|
.sp
|
||||||
.nf
|
.nf
|
||||||
Last updated: 17 September 2018
|
Last updated: 28 April 2021
|
||||||
Copyright (c) 1997-2018 University of Cambridge.
|
Copyright (c) 1997-2021 University of Cambridge.
|
||||||
.fi
|
.fi
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.TH PCRE2TEST 1 "14 September 2020" "PCRE 10.36"
|
.TH PCRE2TEST 1 "28 April 2021" "PCRE 10.37"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
pcre2test - a program for testing Perl-compatible regular expressions.
|
pcre2test - a program for testing Perl-compatible regular expressions.
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -1180,7 +1180,7 @@ its input), you must use \fBposix_startend\fP to specify its length.
|
|||||||
The following modifiers affect the matching process or request additional
|
The following modifiers affect the matching process or request additional
|
||||||
information. Some of them may also be specified on a pattern line (see above),
|
information. Some of them may also be specified on a pattern line (see above),
|
||||||
in which case they apply to every subject line that is matched against that
|
in which case they apply to every subject line that is matched against that
|
||||||
pattern.
|
pattern, but can be overridden by modifiers on the subject.
|
||||||
.sp
|
.sp
|
||||||
aftertext show text after match
|
aftertext show text after match
|
||||||
allaftertext show text after captures
|
allaftertext show text after captures
|
||||||
@ -1389,6 +1389,10 @@ called instead of one of the matching functions (or after one call of
|
|||||||
replacement strings cannot contain commas, because a comma signifies the end of
|
replacement strings cannot contain commas, because a comma signifies the end of
|
||||||
a modifier. This is not thought to be an issue in a test program.
|
a modifier. This is not thought to be an issue in a test program.
|
||||||
.P
|
.P
|
||||||
|
Specifying a completely empty replacement string disables this modifier.
|
||||||
|
However, it is possible to specify an empty replacement by providing a buffer
|
||||||
|
length, as described below, for an otherwise empty replacement.
|
||||||
|
.P
|
||||||
Unlike subject strings, \fBpcre2test\fP does not process replacement strings
|
Unlike subject strings, \fBpcre2test\fP does not process replacement strings
|
||||||
for escape sequences. In UTF mode, a replacement string is checked to see if it
|
for escape sequences. In UTF mode, a replacement string is checked to see if it
|
||||||
is a valid UTF-8 string. If so, it is correctly converted to a UTF string of
|
is a valid UTF-8 string. If so, it is correctly converted to a UTF string of
|
||||||
@ -2101,6 +2105,6 @@ Cambridge, England.
|
|||||||
.rs
|
.rs
|
||||||
.sp
|
.sp
|
||||||
.nf
|
.nf
|
||||||
Last updated: 14 September 2020
|
Last updated: 28 April 2021
|
||||||
Copyright (c) 1997-2020 University of Cambridge.
|
Copyright (c) 1997-2021 University of Cambridge.
|
||||||
.fi
|
.fi
|
||||||
|
13
testdata/testinput2
vendored
13
testdata/testinput2
vendored
@ -5830,6 +5830,19 @@ a)"xI
|
|||||||
|
|
||||||
/55|a(..)d/g,replace=>$1<
|
/55|a(..)d/g,replace=>$1<
|
||||||
xyz55abcdxyzabcdxyz\=ovector=2,substitute_unset_empty
|
xyz55abcdxyzabcdxyz\=ovector=2,substitute_unset_empty
|
||||||
|
|
||||||
|
/abc/replace=,caseless
|
||||||
|
XabcY
|
||||||
|
XABCY
|
||||||
|
|
||||||
|
/abc/replace=[4],caseless
|
||||||
|
XabcY
|
||||||
|
XABCY
|
||||||
|
|
||||||
|
/abc/replace=*,caseless
|
||||||
|
XabcY
|
||||||
|
XABCY
|
||||||
|
XabcY\=replace=
|
||||||
|
|
||||||
# Expect non-fixed-length error
|
# Expect non-fixed-length error
|
||||||
|
|
||||||
|
20
testdata/testoutput2
vendored
20
testdata/testoutput2
vendored
@ -17571,6 +17571,26 @@ Failed: error -55 at offset 3 in replacement: requested value is not set
|
|||||||
/55|a(..)d/g,replace=>$1<
|
/55|a(..)d/g,replace=>$1<
|
||||||
xyz55abcdxyzabcdxyz\=ovector=2,substitute_unset_empty
|
xyz55abcdxyzabcdxyz\=ovector=2,substitute_unset_empty
|
||||||
3: xyz><>bc<xyz>bc<xyz
|
3: xyz><>bc<xyz>bc<xyz
|
||||||
|
|
||||||
|
/abc/replace=,caseless
|
||||||
|
XabcY
|
||||||
|
0: abc
|
||||||
|
XABCY
|
||||||
|
0: ABC
|
||||||
|
|
||||||
|
/abc/replace=[4],caseless
|
||||||
|
XabcY
|
||||||
|
1: XY
|
||||||
|
XABCY
|
||||||
|
1: XY
|
||||||
|
|
||||||
|
/abc/replace=*,caseless
|
||||||
|
XabcY
|
||||||
|
1: X*Y
|
||||||
|
XABCY
|
||||||
|
1: X*Y
|
||||||
|
XabcY\=replace=
|
||||||
|
0: abc
|
||||||
|
|
||||||
# Expect non-fixed-length error
|
# Expect non-fixed-length error
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user