Documentation and tests update.

This commit is contained in:
Philip.Hazel 2021-04-28 14:21:38 +00:00
parent 080d7789eb
commit 85fc061dcf
4 changed files with 51 additions and 9 deletions

View File

@ -1,4 +1,4 @@
.TH PCRE2 3 "17 September 2018" "PCRE2 10.33"
.TH PCRE2 3 "28 April 2021" "PCRE2 10.37"
.SH NAME
PCRE2 - Perl-compatible regular expressions (revised API)
.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
that give better ECMAScript (aka JavaScript) compatibility.
.P
The source code for PCRE2 can be compiled to support 8-bit, 16-bit, or 32-bit
code units, which means that up to three separate libraries may be installed.
The source code for PCRE2 can be compiled to support strings of 8-bit, 16-bit,
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
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
@ -197,6 +202,6 @@ use my two initials, followed by the two digits 10, at the domain cam.ac.uk.
.rs
.sp
.nf
Last updated: 17 September 2018
Copyright (c) 1997-2018 University of Cambridge.
Last updated: 28 April 2021
Copyright (c) 1997-2021 University of Cambridge.
.fi

View File

@ -1,4 +1,4 @@
.TH PCRE2TEST 1 "14 September 2020" "PCRE 10.36"
.TH PCRE2TEST 1 "28 April 2021" "PCRE 10.37"
.SH NAME
pcre2test - a program for testing Perl-compatible regular expressions.
.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
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
pattern.
pattern, but can be overridden by modifiers on the subject.
.sp
aftertext show text after match
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
a modifier. This is not thought to be an issue in a test program.
.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
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
@ -2101,6 +2105,6 @@ Cambridge, England.
.rs
.sp
.nf
Last updated: 14 September 2020
Copyright (c) 1997-2020 University of Cambridge.
Last updated: 28 April 2021
Copyright (c) 1997-2021 University of Cambridge.
.fi

13
testdata/testinput2 vendored
View File

@ -5830,6 +5830,19 @@ a)"xI
/55|a(..)d/g,replace=>$1<
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

20
testdata/testoutput2 vendored
View File

@ -17571,6 +17571,26 @@ Failed: error -55 at offset 3 in replacement: requested value is not set
/55|a(..)d/g,replace=>$1<
xyz55abcdxyzabcdxyz\=ovector=2,substitute_unset_empty
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