Template:Replace/doc

{ {replace |string |target |replacement [|count=n]} }

Returns string with the first n occurrences of target replaced with replacement. Omitting  will replace all occurrences.

Examples

 * &rarr; One NINE two three two four twotwo five
 * &rarr; One NINE two three two four twotwo five

TemplateData
{	"description": "This template replaces a substring in a string with a given replacement.", "format": "inline", "params": { "1": {			"label": "source string", "description": "The string to replace in", "required": true },		"2": {			"label": "pattern", "description": "The string or Lua ustring pattern to search for", "required": true },		"3": {			"label": "replacement", "description": "The replacement text", "required": true },		"count": { "label": "count", "description": "The number of occurrences to replace; defaults to all", "type": "number" },		"regex": { "label": "regex", "description": "Whether the pattern is a Lua ustring pattern (no means search for literally that character sequence)", "example": "yes", "type": "boolean", "default": "no" }	} }