Difference between revisions of "Template:Search"

Line 2: Line 2:
 
{{#dpl:
 
{{#dpl:
 
   |namespace =  
 
   |namespace =  
   |nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z](...)?[)]))$
+
   |nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z][)]))$
   |titlematch = ^[A-J]
+
   |titlematch = A%{{!}}B%{{!}}C%{{!}}D%{{!}}E%{{!}}F%{{!}}G%{{!}}H%{{!}}I%{{!}}J%
 
   |include = *
 
   |include = *
 
   |includematch = @{{{1}}}@
 
   |includematch = @{{{1}}}@
Line 11: Line 11:
 
{{#dpl:
 
{{#dpl:
 
   |namespace =  
 
   |namespace =  
   |nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z](...)?[)]))$
+
   |nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z][)]))$
   |titlematch = ^K[A-Z]
+
   |titlematch = K%
 
   |include = *
 
   |include = *
 
   |includematch = @{{{1}}}@
 
   |includematch = @{{{1}}}@
Line 20: Line 20:
 
{{#dpl:
 
{{#dpl:
 
   |namespace =  
 
   |namespace =  
   |nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z](...)?[)]))$
+
   |nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z][)]))$
   |titlematch = ^K[a-ce-z]
+
   |titlematch = L%{{!}}M%{{!}}N%{{!}}O%{{!}}P%{{!}}Q%{{!}}R%{{!}}S%{{!}}T%{{!}}U%{{!}}V%{{!}}W%{{!}}X%{{!}}Y%{{!}}Z%
 
   |include = *
 
   |include = *
 
   |includematch = @{{{1}}}@
 
   |includematch = @{{{1}}}@
 
   |includemaxlength = 0
 
   |includemaxlength = 0
 
   |format = ,\n* [[%PAGE%{{!}}%TITLE%]],,
 
   |format = ,\n* [[%PAGE%{{!}}%TITLE%]],,
}}
+
}}</includeonly><noinclude>
{{#dpl:
 
  |namespace =
 
  |nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z](...)?[)]))$
 
  |titlematch = ^Kd
 
  |include = *
 
  |includematch = @{{{1}}}@
 
  |includemaxlength = 0
 
  |format = ,\n* [[%PAGE%{{!}}%TITLE%]],,
 
}}
 
{{#dpl:
 
  |namespace =
 
  |nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z](...)?[)]))$
 
  |titlematch = ^[L-Z]
 
  |include = *
 
  |includematch = @{{{1}}}@
 
  |includemaxlength = 0
 
  |format = ,\n* [[%PAGE%{{!}}%TITLE%]],,
 
}}
 
</includeonly><noinclude>
 
 
<!--{{#dpl:
 
<!--{{#dpl:
 
   |namespace =  
 
   |namespace =  

Revision as of 17:04, 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

{{#dpl:

 |namespace = 
 |nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z][)]))$
 |titlematch = A%|B%|C%|D%|E%|F%|G%|H%|I%|J%
 |include = *
 |includematch = @Learn [email protected]
 |includemaxlength = 0
 |format = ,\n* %TITLE%,,

}} {{#dpl:

 |namespace = 
 |nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z][)]))$
 |titlematch = K%
 |include = *
 |includematch = @Learn [email protected]
 |includemaxlength = 0
 |format = ,\n* %TITLE%,,

}} {{#dpl:

 |namespace = 
 |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%
 |include = *
 |includematch = @Learn [email protected]
 |includemaxlength = 0
 |format = ,\n* %TITLE%,,

}}

{{#dpl:

 |namespace = 
 |nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z][)]))$
 |titlematch = A%|B%|C%|D%|E%|F%|G%|H%|I%|J%
 |include = *
 |includematch = @[email protected]
 |includemaxlength = 0
 |format = ,\n* %TITLE%,,

}} {{#dpl:

 |namespace = 
 |nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z][)]))$
 |titlematch = K%
 |include = *
 |includematch = @[email protected]
 |includemaxlength = 0
 |format = ,\n* %TITLE%,,

}} {{#dpl:

 |namespace = 
 |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%
 |include = *
 |includematch = @[email protected]
 |includemaxlength = 0
 |format = ,\n* %TITLE%,,

}}


Content is available under Creative Commons License SA 4.0 unless otherwise noted.
-->