Jump to content

Examples/Module: dplreplace (example 2)

From DynamicPageList4 Manual
Please do not edit this page unless you're wanting to edit the manual itself, it is an example included in the manual.

Example

[edit source]

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

[edit source]

AAa

Cookies help us deliver our services. By using our services, you agree to our use of cookies.