[Pcre-svn] [435] code/trunk/doc/pcre2test.1: Documentation i…

Inizio della pagina
Delete this message
Autore: Subversion repository
Data:  
To: pcre-svn
Oggetto: [Pcre-svn] [435] code/trunk/doc/pcre2test.1: Documentation improvement.
Revision: 435
          http://www.exim.org/viewvc/pcre2?view=rev&revision=435
Author:   ph10
Date:     2015-11-14 17:08:03 +0000 (Sat, 14 Nov 2015)
Log Message:
-----------
Documentation improvement.


Modified Paths:
--------------
    code/trunk/doc/pcre2test.1


Modified: code/trunk/doc/pcre2test.1
===================================================================
--- code/trunk/doc/pcre2test.1    2015-11-14 16:48:32 UTC (rev 434)
+++ code/trunk/doc/pcre2test.1    2015-11-14 17:08:03 UTC (rev 435)
@@ -1,4 +1,4 @@
-.TH PCRE2TEST 1 "05 November 2015" "PCRE 10.21"
+.TH PCRE2TEST 1 "14 November 2015" "PCRE 10.21"
 .SH NAME
 pcre2test - a program for testing Perl-compatible regular expressions.
 .SH SYNOPSIS
@@ -1091,14 +1091,17 @@
 .rs
 .sp
 If the \fBreplace\fP modifier is set, the \fBpcre2_substitute()\fP function is
-called instead of one of the matching functions. 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 the appropriate code unit
-width. If it is not a valid UTF-8 string, the individual code units are copied
-directly. This provides a means of passing an invalid UTF-8 string for testing
-purposes.
+called instead of one of the matching functions. Note that 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
+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
+the appropriate code unit width. If it is not a valid UTF-8 string, the
+individual code units are copied directly. This provides a means of passing an
+invalid UTF-8 string for testing purposes.
+.P
 If the \fBglobal\fP modifier is set, PCRE2_SUBSTITUTE_GLOBAL is passed to
 \fBpcre2_substitute()\fP. After a successful substitution, the modified string
 is output, preceded by the number of replacements. This may be zero if there
@@ -1110,12 +1113,12 @@
       =abc=abc=\e=global
    2: =xxx=xxx=
 .sp
-Subject and replacement strings should be kept relatively short for
-substitution tests, as fixed-size buffers are used. To make it easy to test for
-buffer overflow, if the replacement string starts with a number in square
-brackets, that number is passed to \fBpcre2_substitute()\fP as the size of the
-output buffer, with the replacement string starting at the next character. Here
-is an example that tests the edge case:
+Subject and replacement strings should be kept relatively short (fewer than 256
+characters) for substitution tests, as fixed-size buffers are used. To make it
+easy to test for buffer overflow, if the replacement string starts with a
+number in square brackets, that number is passed to \fBpcre2_substitute()\fP as
+the size of the output buffer, with the replacement string starting at the next
+character. Here is an example that tests the edge case:
 .sp
   /abc/
       123abc123\e=replace=[10]XYZ
@@ -1606,6 +1609,6 @@
 .rs
 .sp
 .nf
-Last updated: 05 November 2015
+Last updated: 14 November 2015
 Copyright (c) 1997-2015 University of Cambridge.
 .fi