diff options
author | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2019-12-27 13:35:17 +0000 |
---|---|---|
committer | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2019-12-27 13:35:17 +0000 |
commit | e5add45d2f1cb11e6a2370e7bf4fbd1d60ce306e (patch) | |
tree | fb4cffc7ab1a0dd5002c55934a4a94a36be46b93 /doc/pcre2_substitute.3 | |
parent | 9f153bc00e6be6b02f2f8c63a34bfa6c37b9f99d (diff) | |
download | pcre2-e5add45d2f1cb11e6a2370e7bf4fbd1d60ce306e.tar.gz |
Implement PCRE2_SUBSTITUTE_MATCHED.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1196 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'doc/pcre2_substitute.3')
-rw-r--r-- | doc/pcre2_substitute.3 | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/doc/pcre2_substitute.3 b/doc/pcre2_substitute.3 index 4670206..e53159d 100644 --- a/doc/pcre2_substitute.3 +++ b/doc/pcre2_substitute.3 @@ -1,4 +1,4 @@ -.TH PCRE2_SUBSTITUTE 3 "26 December 2019" "PCRE2 10.35" +.TH PCRE2_SUBSTITUTE 3 "27 December 2019" "PCRE2 10.35" .SH NAME PCRE2 - Perl-compatible regular expressions (revised API) .SH SYNOPSIS @@ -36,8 +36,8 @@ Its arguments are: \fIoutlengthptr\fP Points to the length of the output buffer .sp A match data block is needed only if you want to inspect the data from the -match that is returned in that block. A match context is needed only if you -want to: +match that is returned in that block or if PCRE2_SUBSTITUTE_MATCHED is set. A +match context is needed only if you want to: .sp Set up a callout function Set a matching offset limit @@ -67,15 +67,16 @@ zero-terminated strings. The options are: PCRE2_SUBSTITUTE_EXTENDED Do extended replacement processing PCRE2_SUBSTITUTE_GLOBAL Replace all occurrences in the subject PCRE2_SUBSTITUTE_LITERAL The replacement string is literal + PCRE2_SUBSTITUTE_MATCHED Use pre-existing match data for 1st match PCRE2_SUBSTITUTE_OVERFLOW_LENGTH If overflow, compute needed length PCRE2_SUBSTITUTE_UNKNOWN_UNSET Treat unknown group as unset PCRE2_SUBSTITUTE_UNSET_EMPTY Simple unset insert = empty string .sp -PCRE2_SUBSTITUTE_LITERAL overrides PCRE2_SUBSTITUTE_EXTENDED, -PCRE2_SUBSTITUTE_UNKNOWN_UNSET, and PCRE2_SUBSTITUTE_UNSET_EMPTY. +If PCRE2_SUBSTITUTE_LITERAL is set, PCRE2_SUBSTITUTE_EXTENDED, +PCRE2_SUBSTITUTE_UNKNOWN_UNSET, and PCRE2_SUBSTITUTE_UNSET_EMPTY are ignored. .P The function returns the number of substitutions, which may be zero if there -were no matches. The result can be greater than one only when +are no matches. The result may be greater than one only when PCRE2_SUBSTITUTE_GLOBAL is set. In the event of an error, a negative error code is returned. .P |