Examples/Parameter: includematch (example 2)

From DynamicPageList3 Manual
Revision as of 01:53, 23 April 2022 by imported>FrozenPlum (Convert to parser function syntax per my mandate)
Please do not edit this page unless you're wanting to edit the manual itself, it is an example included in the manual.

Example

This list articles in the Category:Countries in North America category, which contain a call to the template "Country-Infobox" and use the "capital" parameter of that template with an arguement that contains "Ottawa" as a text string. It would stop pattern matching after the line containing |capital=Ottowa. This example is formatted as a (simple) table using the table parameter.

{{#dpl:
|category=Countries in North America
|include={Country-Infobox}:capital
|includematch=/capital\s*=\s*[^¦]*Ottawa/s
|table=class="wikitable sortable",Page,Capital
}}

Result

{{#dpl: |category=Countries in North America |include={Country-Infobox}:capital |includematch=/capital\s*=\s*[^¦]*Ottawa/s |table=class="wikitable sortable",Page,Capital }}