Examples/Parameter: includematch (example 2): Difference between revisions
< Examples
Content added Content deleted
imported>FrozenPlum m (Convert to parser function syntax per my mandate) |
imported>FrozenPlum m (FrozenPlum moved page Criteria for page selection/Parameter: includematch (example 2) to Examples/Parameter: includematch (example 2): Simplifying how things are structured) |
||
(One intermediate revision by one other user not shown) | |||
Line 6: | Line 6: | ||
==Example== |
==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 |
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 argument that contains "Ottawa" as a text string. It would stop pattern matching after the line containing <code>|capital=Ottawa</code>. This example is formatted as a (simple) table using the {{DPL|table}} parameter. |
||
<pre> |
<pre> |
Latest revision as of 22:40, 31 March 2023
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 argument that contains "Ottawa" as a text string. It would stop pattern matching after the line containing |capital=Ottawa
. 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 }}