Template:Search: Difference between revisions

From KDE UserBase Wiki
No edit summary
No edit summary
Line 3: Line 3:
   |namespace =  
   |namespace =  
   |nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z][)]))$
   |nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z][)]))$
   |titlematch = ^[A-J]
   |titleregexp = ^[A-J]
   |include = *
   |include = *
   |includematch = @{{{1}}}@
   |includematch = @{{{1}}}@
Line 12: Line 12:
   |namespace =  
   |namespace =  
   |nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z][)]))$
   |nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z][)]))$
   |titlematch = K%
   |titleregexp = ^K[A-Z]
   |include = *
   |include = *
   |includematch = @{{{1}}}@
   |includematch = @{{{1}}}@
Line 21: Line 21:
   |namespace =  
   |namespace =  
   |nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z][)]))$
   |nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z][)]))$
   |titlematch = L%{{!}}M%{{!}}N%{{!}}O%{{!}}P%{{!}}Q%{{!}}R%{{!}}S%{{!}}T%{{!}}U%{{!}}V%{{!}}W%{{!}}X%{{!}}Y%{{!}}Z%
   |titleregexp = ^K[a-ce-z]
  |include = *
  |includematch = @{{{1}}}@
  |includemaxlength = 0
  |format = ,\n* [[%PAGE%{{!}}%TITLE%]],,
}}
{{#dpl:
  |namespace =
  |nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z][)]))$
  |titleregexp = ^Kd
  |include = *
  |includematch = @{{{1}}}@
  |includemaxlength = 0
  |format = ,\n* [[%PAGE%{{!}}%TITLE%]],,
}}
{{#dpl:
  |namespace =
  |nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z][)]))$
  |titleregexp = ^[L-Z]
   |include = *
   |include = *
   |includematch = @{{{1}}}@
   |includematch = @{{{1}}}@

Revision as of 17:08, 22 July 2013

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