Template:Replace text: Difference between revisions
Template page
More actions
copied from enwp, avoiding conflict with commons' existing "template:replace" |
No edit summary |
||
| Line 1: | Line 1: | ||
{{#invoke:String|replace|source={{{1}}}|{{{2}}}|{{{3}}}|count={{{count|}}}}}<noinclude> | {{<includeonly>safesubst:</includeonly>#invoke:String|replace|source={{{1}}}|{{{2}}}|{{{3}}}|count={{{count|}}}}}<noinclude> | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> | ||
Revision as of 22:54, 4 April 2017
{{{1}}}
This documentation is transcluded from Template:Replace text/doc.
This template is for replacing certain patterns in strings, for example in template parameters.
Usage
{{replace text |1= |2= |3= }}
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 | source | The source string | empty | required |
2 | pattern | The pattern to be replaced. Regexes are not allowed (use Module:String directly to use them). | empty | required |
3 | replacement | The string to be inserted in place of the pattern. | empty | required |
count | replace count | The number of occurrences to replace. If not given, replace all. | empty | optional |
Additional information
The template is intended to be used in the following namespaces: the Template namespace
The template is intended to be used by the following user groups: all users
Relies on:
Module:String
Localization
This template is not intended to be localized.