Clarify delimiter handling in pcre2test documentation.

This commit is contained in:
Philip Hazel 2021-08-28 12:46:50 +01:00
parent f4beac6c1a
commit 5ff1daffa0
4 changed files with 485 additions and 477 deletions

View File

@ -6,7 +6,8 @@ API. Since its initial release in 2015, there has been further development of
the code and it now differs from PCRE1 in more than just the API. There are new the code and it now differs from PCRE1 in more than just the API. There are new
features, and the internals have been improved. The original PCRE1 library is features, and the internals have been improved. The original PCRE1 library is
now obsolete and should not be used in new projects. The latest release of now obsolete and should not be used in new projects. The latest release of
PCRE2 is available in .tar.gz or .zip form from its GitHub repository: PCRE2 is available in .tar.gz, tar.bz2, or .zip form from this GitHub
repository:
https://github.com/PhilipHazel/pcre2/releases https://github.com/PhilipHazel/pcre2/releases
@ -905,4 +906,4 @@ The distribution should contain the files listed below.
Philip Hazel Philip Hazel
Email local part: Philip.Hazel Email local part: Philip.Hazel
Email domain: gmail.com Email domain: gmail.com
Last updated: 25 August 2021 Last updated: 27 August 2021

View File

@ -486,15 +486,17 @@ excluding pattern meta-characters):
</pre> </pre>
This is interpreted as the pattern's delimiter. A regular expression may be This is interpreted as the pattern's delimiter. A regular expression may be
continued over several input lines, in which case the newline characters are continued over several input lines, in which case the newline characters are
included within it. It is possible to include the delimiter within the pattern included within it. It is possible to include the delimiter as a literal within
by escaping it with a backslash, for example the pattern by escaping it with a backslash, for example
<pre> <pre>
/abc\/def/ /abc\/def/
</pre> </pre>
If you do this, the escape and the delimiter form part of the pattern, but If you do this, the escape and the delimiter form part of the pattern, but
since the delimiters are all non-alphanumeric, this does not affect its since the delimiters are all non-alphanumeric, the inclusion of the backslash
interpretation. If the terminating delimiter is immediately followed by a does not affect the pattern's interpretation. Note, however, that this trick
backslash, for example, does not work within \Q...\E literal bracketing because the backslash will
itself be interpreted as a literal. If the terminating delimiter is immediately
followed by a backslash, for example,
<pre> <pre>
/abc/\ /abc/\
</pre> </pre>
@ -2117,14 +2119,14 @@ on the stack.
<P> <P>
Philip Hazel Philip Hazel
<br> <br>
University Computing Service Retired from University Computing Service
<br> <br>
Cambridge, England. Cambridge, England.
<br> <br>
</P> </P>
<br><a name="SEC21" href="#TOC1">REVISION</a><br> <br><a name="SEC21" href="#TOC1">REVISION</a><br>
<P> <P>
Last updated: 28 April 2021 Last updated: 28 August 2021
<br> <br>
Copyright &copy; 1997-2021 University of Cambridge. Copyright &copy; 1997-2021 University of Cambridge.
<br> <br>

View File

@ -1,4 +1,4 @@
.TH PCRE2TEST 1 "28 April 2021" "PCRE 10.37" .TH PCRE2TEST 1 "28 August 2021" "PCRE 10.38"
.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
@ -443,15 +443,17 @@ excluding pattern meta-characters):
.sp .sp
This is interpreted as the pattern's delimiter. A regular expression may be This is interpreted as the pattern's delimiter. A regular expression may be
continued over several input lines, in which case the newline characters are continued over several input lines, in which case the newline characters are
included within it. It is possible to include the delimiter within the pattern included within it. It is possible to include the delimiter as a literal within
by escaping it with a backslash, for example the pattern by escaping it with a backslash, for example
.sp .sp
/abc\e/def/ /abc\e/def/
.sp .sp
If you do this, the escape and the delimiter form part of the pattern, but If you do this, the escape and the delimiter form part of the pattern, but
since the delimiters are all non-alphanumeric, this does not affect its since the delimiters are all non-alphanumeric, the inclusion of the backslash
interpretation. If the terminating delimiter is immediately followed by a does not affect the pattern's interpretation. Note, however, that this trick
backslash, for example, does not work within \eQ...\eE literal bracketing because the backslash will
itself be interpreted as a literal. If the terminating delimiter is immediately
followed by a backslash, for example,
.sp .sp
/abc/\e /abc/\e
.sp .sp
@ -2096,7 +2098,7 @@ on the stack.
.sp .sp
.nf .nf
Philip Hazel Philip Hazel
University Computing Service Retired from University Computing Service
Cambridge, England. Cambridge, England.
.fi .fi
. .
@ -2105,6 +2107,6 @@ Cambridge, England.
.rs .rs
.sp .sp
.nf .nf
Last updated: 28 April 2021 Last updated: 28 August 2021
Copyright (c) 1997-2021 University of Cambridge. Copyright (c) 1997-2021 University of Cambridge.
.fi .fi

File diff suppressed because it is too large Load Diff