Examples/Parameter: includenotmatch (example 1): Difference between revisions

From DynamicPageList3 Manual
imported>FrozenPlum
(Created page with "<noinclude>{{note|Please '''do not edit''' this page unless you're wanting to edit the manual itself, it is an example included in the manual.|error}}</noinclude><!-- This is the example preloaded for testing, press "Show Preview" to see the example working (at the bottom of the page). If you save this page, it saves as a new section at the bottom of your '''User:Username/Sandbox''' --> ==Example== This will list articles in Category:Countries in North America tha...")
 
imported>FrozenPlum
 
(No difference)

Latest revision as of 22:40, 31 March 2023

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 will list articles in Category:Countries in North America that contain a call to the template "Country-Infobox" and use the "capital" parameter, with an argument that does not contain "Ottawa" or "ottawa" as a text string. Note that there is no pattern specified for the first element of the include statement. "OTTAWA" would not match; we could use the "i" modifier with the regexp to match without case sensitivity if we wanted so.

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

Result

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