diff options
author | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2020-01-22 17:50:12 +0000 |
---|---|---|
committer | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2020-01-22 17:50:12 +0000 |
commit | 2a3a1cac73fcec1e115a27d7d77339b48cb8bb71 (patch) | |
tree | 3333d89f96f81d02d5ab6350ffecaa299cf0db19 /doc/html/pcre2test.html | |
parent | 7327c782a1c734421c8c71726c8085b3fa414d45 (diff) | |
download | pcre2-2a3a1cac73fcec1e115a27d7d77339b48cb8bb71.tar.gz |
Implement PCRE2_SUBSTITUTE_REPLACEMENT_ONLY.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1206 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'doc/html/pcre2test.html')
-rw-r--r-- | doc/html/pcre2test.html | 61 |
1 files changed, 35 insertions, 26 deletions
diff --git a/doc/html/pcre2test.html b/doc/html/pcre2test.html index c73d360..bfd22e9 100644 --- a/doc/html/pcre2test.html +++ b/doc/html/pcre2test.html @@ -1050,25 +1050,27 @@ modifier list, in which case they are applied to every subject line that is processed with that pattern. These modifiers do not affect the compilation process. <pre> - aftertext show text after match - allaftertext show text after captures - allcaptures show all captures - allvector show the entire ovector - allusedtext show all consulted text - altglobal alternative global matching - /g global global matching - jitstack=<n> set size of JIT stack - mark show mark values - replace=<string> specify a replacement string - startchar show starting character when relevant - substitute_callout use substitution callouts - substitute_extended use PCRE2_SUBSTITUTE_EXTENDED - substitute_literal use PCRE2_SUBSTITUTE_LITERAL - substitute_overflow_length use PCRE2_SUBSTITUTE_OVERFLOW_LENGTH - substitute_skip=<n> skip substitution number n - substitute_stop=<n> skip substitution number n and greater - substitute_unknown_unset use PCRE2_SUBSTITUTE_UNKNOWN_UNSET - substitute_unset_empty use PCRE2_SUBSTITUTE_UNSET_EMPTY + aftertext show text after match + allaftertext show text after captures + allcaptures show all captures + allvector show the entire ovector + allusedtext show all consulted text + altglobal alternative global matching + /g global global matching + jitstack=<n> set size of JIT stack + mark show mark values + replace=<string> specify a replacement string + startchar show starting character when relevant + substitute_callout use substitution callouts + substitute_extended use PCRE2_SUBSTITUTE_EXTENDED + substitute_literal use PCRE2_SUBSTITUTE_LITERAL + substitute_matched use PCRE2_SUBSTITUTE_MATCHED + substitute_overflow_length use PCRE2_SUBSTITUTE_OVERFLOW_LENGTH + substitute_replacement_only use PCRE2_SUBSTITUTE_REPLACEMENT_ONLY + substitute_skip=<n> skip substitution <n> + substitute_stop=<n> skip substitution <n> and following + substitute_unknown_unset use PCRE2_SUBSTITUTE_UNKNOWN_UNSET + substitute_unset_empty use PCRE2_SUBSTITUTE_UNSET_EMPTY </pre> These modifiers may not appear in a <b>#pattern</b> command. If you want them as defaults, set them in a <b>#subject</b> command. @@ -1235,7 +1237,9 @@ pattern. substitute_callout use substitution callouts substitute_extedded use PCRE2_SUBSTITUTE_EXTENDED substitute_literal use PCRE2_SUBSTITUTE_LITERAL + substitute_matched use PCRE2_SUBSTITUTE_MATCHED substitute_overflow_length use PCRE2_SUBSTITUTE_OVERFLOW_LENGTH + substitute_replacement_only use PCRE2_SUBSTITUTE_REPLACEMENT_ONLY substitute_skip=<n> skip substitution number n substitute_stop=<n> skip substitution number n and greater substitute_unknown_unset use PCRE2_SUBSTITUTE_UNKNOWN_UNSET @@ -1397,9 +1401,10 @@ Testing the substitution function </b><br> <P> If the <b>replace</b> modifier is set, the <b>pcre2_substitute()</b> function is -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. +called instead of one of the matching functions (or after one call of +<b>pcre2_match()</b> in the case of PCRE2_SUBSTITUTE_MATCHED). 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> <P> Unlike subject strings, <b>pcre2test</b> does not process replacement strings @@ -1416,11 +1421,15 @@ for <b>pcre2_substitute()</b>: global PCRE2_SUBSTITUTE_GLOBAL substitute_extended PCRE2_SUBSTITUTE_EXTENDED substitute_literal PCRE2_SUBSTITUTE_LITERAL + substitute_matched PCRE2_SUBSTITUTE_MATCHED substitute_overflow_length PCRE2_SUBSTITUTE_OVERFLOW_LENGTH + substitute_replacement_only PCRE2_SUBSTITUTE_REPLACEMENT_ONLY substitute_unknown_unset PCRE2_SUBSTITUTE_UNKNOWN_UNSET substitute_unset_empty PCRE2_SUBSTITUTE_UNSET_EMPTY - -</PRE> +</pre> +See the +<a href="pcre2api.html"><b>pcre2api</b></a> +documentation for details of these options. </P> <P> After a successful substitution, the modified string is output, preceded by the @@ -2096,9 +2105,9 @@ Cambridge, England. </P> <br><a name="SEC21" href="#TOC1">REVISION</a><br> <P> -Last updated: 26 December 2019 +Last updated: 22 January 2020 <br> -Copyright © 1997-2019 University of Cambridge. +Copyright © 1997-2020 University of Cambridge. <br> <p> Return to the <a href="index.html">PCRE2 index page</a>. |