Examples/Module: dplreplace (example 2)
< Examples
Example
This replaces "a" and its following characters until the next "r", with "A". This example uses a regular expression as pattern, indicated by the "/" characters, and is using the lookahead syntax ?
to find the "r".
Matches, with the group match in (): "a(br)", "a(kadabr)".
{{#dplreplace:abrakadabra|/a(.*?r)/|A}}
Result
{{#dplreplace:abrakadabra|/a(.*?r)/|A}}