Difference between revisions of "Template:Search"
(Modified to accomodate the growing number of Kdenlive pages) |
(Corrected descriptive text) |
||
Line 8: | Line 8: | ||
|includemaxlength = 0 | |includemaxlength = 0 | ||
|format = ,\n* [[%PAGE%{{!}}%TITLE%]],, | |format = ,\n* [[%PAGE%{{!}}%TITLE%]],, | ||
− | | resultsheader = There are %TOTALPAGES% pages beginning with | + | | resultsheader = There are %TOTALPAGES% pages beginning with A-J\n |
}} | }} | ||
{{#dpl: | {{#dpl: | ||
Line 18: | Line 18: | ||
|includemaxlength = 0 | |includemaxlength = 0 | ||
|format = ,\n* [[%PAGE%{{!}}%TITLE%]],, | |format = ,\n* [[%PAGE%{{!}}%TITLE%]],, | ||
− | | resultsheader = There are %TOTALPAGES% pages beginning with | + | | resultsheader = There are %TOTALPAGES% pages beginning with KA-KZ\n |
}} | }} | ||
{{#dpl: | {{#dpl: | ||
Line 28: | Line 28: | ||
|includemaxlength = 0 | |includemaxlength = 0 | ||
|format = ,\n* [[%PAGE%{{!}}%TITLE%]],, | |format = ,\n* [[%PAGE%{{!}}%TITLE%]],, | ||
− | | resultsheader = There are %TOTALPAGES% pages beginning with Kd\n | + | | resultsheader = There are %TOTALPAGES% pages beginning with Ka-Kz but not Kd\n |
}} | }} | ||
{{#dpl: | {{#dpl: | ||
Line 48: | Line 48: | ||
|includemaxlength = 0 | |includemaxlength = 0 | ||
|format = ,\n* [[%PAGE%{{!}}%TITLE%]],, | |format = ,\n* [[%PAGE%{{!}}%TITLE%]],, | ||
− | | resultsheader = There are %TOTALPAGES% pages beginning with | + | | resultsheader = There are %TOTALPAGES% pages beginning with L-Z\n |
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
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>. | 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>. |
Latest revision as of 14:50, 19 January 2014
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
{{#dpl:
|namespace = |nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z][)]))$ |titleregexp = ^[A-J] |include = * |includematch = @Learn [email protected] |includemaxlength = 0 |format = ,\n* %TITLE%,,
| resultsheader = There are %TOTALPAGES% pages beginning with A-J\n }} {{#dpl:
|namespace = |nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z][)]))$ |titleregexp = ^K[A-Z] |include = * |includematch = @Learn [email protected] |includemaxlength = 0 |format = ,\n* %TITLE%,,
| resultsheader = There are %TOTALPAGES% pages beginning with KA-KZ\n }} {{#dpl:
|namespace = |nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z][)]))$ |titleregexp = ^K[a-ce-z] |include = * |includematch = @Learn [email protected] |includemaxlength = 0 |format = ,\n* %TITLE%,,
| resultsheader = There are %TOTALPAGES% pages beginning with Ka-Kz but not Kd\n }} {{#dpl:
|namespace = |nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z][)]))$ |titleregexp = ^Kd |include = * |includematch = @Learn [email protected] |includemaxlength = 0 |format = ,\n* %TITLE%,,
| resultsheader = There are %TOTALPAGES% pages beginning with Kd\n }} {{#dpl:
|namespace = |nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z][)]))$ |titleregexp = ^[L-Z] |include = * |includematch = @Learn [email protected] |includemaxlength = 0 |format = ,\n* %TITLE%,,
| resultsheader = There are %TOTALPAGES% pages beginning with L-Z\n }}