FANDOM


Manual dplreplace

Syntax

  {{#dplreplace:text|pattern|replacement}}

Effect

Replaces the given pattern within the text by replacement.

pattern is a regular expression as defined by php preg_replace().

replacement may contain references to matching parts.

Example

 {{#dplreplace:abrakadabra|ab|AB}}     returns:   ABrakadABra
 {{#dplreplace:abrakadabra|/a(.*?)r/|A\1_r_}}  returns:   Ab_r_Akadab_r_a

The second example only replaces "a" by "A" if there is an "r" somewhere after the "a".

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.