Template:Search: Difference between revisions

From KDE UserBase Wiki
No edit summary
(Added example)
Line 28: Line 28:
}}
}}
</includeonly><noinclude>
</includeonly><noinclude>
Find pages containing a string: <code><nowiki>{{Search|xyz}}</nowiki></code> finds all pages containing the string ''xyz''. Searches are case sensitive. In order to find both ''xyz'' and ''Xyz'' use a regular expression: <code><nowiki>{{Search|[Xx]yz}}</nowiki></code>.
Find pages containing a string: <code><nowiki>{{Search|</nowiki>'''''string'''''<nowiki>}}</nowiki></code> finds all pages containing the '''''string'''''. Searches are case sensitive. In order to find both ''xyz'' and ''Xyz'' use a regular expression: <code><nowiki>{{Search|[Xx]yz}}</nowiki></code>.


Regular expressions use a perl like syntax. Special characters like '[', '[','(' and ')' need to be escaped.
Regular expressions use a perl like syntax. Special characters like '[', '[','(' and ')' need to be escaped.
Line 34: Line 34:
No wiki expansion takes place before passing arguments to the template.
No wiki expansion takes place before passing arguments to the template.


Example: <code><nowiki>{{Search|1=Learn more}}</nowiki></code> gives
{{Search|1=Learn more}}
{{Search|1=Learn more}}
[[Category:Template]]
[[Category:Template]]
</noinclude>
</noinclude>

Revision as of 19:17, 30 August 2012

Find pages containing a string: {{Search|string}} finds all pages containing the string. Searches are case sensitive. In order to find both xyz and Xyz use a regular expression: {{Search|[Xx]yz}}.

Regular expressions use a perl like syntax. Special characters like '[', '[','(' and ')' need to be escaped.

No wiki expansion takes place before passing arguments to the template.

Example: {{Search|1=Learn more}} gives