summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2021-04-28 14:21:38 +0000
committerph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2021-04-28 14:21:38 +0000
commitab5bec78a6f8d493b59abc1ae6102dfe441f1145 (patch)
tree9665d0a6b2f56bff0c68b328b083e176ba702616
parentc521828d66dbf6331fe585d48aca02b2b1e00146 (diff)
downloadpcre2-ab5bec78a6f8d493b59abc1ae6102dfe441f1145.tar.gz
Documentation and tests update.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1307 6239d852-aaf2-0410-a92c-79f79f948069
-rw-r--r--doc/pcre2.315
-rw-r--r--doc/pcre2test.112
-rw-r--r--testdata/testinput213
-rw-r--r--testdata/testoutput220
4 files changed, 51 insertions, 9 deletions
diff --git a/doc/pcre2.3 b/doc/pcre2.3
index 75450ec..efe41c5 100644
--- a/doc/pcre2.3
+++ b/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
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
diff --git a/doc/pcre2test.1 b/doc/pcre2test.1
index c63f03d..7331e2e 100644
--- a/doc/pcre2test.1
+++ b/doc/pcre2test.1
@@ -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
diff --git a/testdata/testinput2 b/testdata/testinput2
index 87e3394..865c903 100644
--- a/testdata/testinput2
+++ b/testdata/testinput2
@@ -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
diff --git a/testdata/testoutput2 b/testdata/testoutput2
index 4d8f65d..6065ed7 100644
--- a/testdata/testoutput2
+++ b/testdata/testoutput2
@@ -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