
| Line: 1 to 1 | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 
 TWiki Formatted Search | |||||||||||||||||||
| Line: 23 to 23 | |||||||||||||||||||
| 
 | |||||||||||||||||||
| Changed: | |||||||||||||||||||
| < < |  2.  | ||||||||||||||||||
| > > |  2. Use the footer parameter to specify the footer of a search result. It should correspond to the format of the format parameter. This parameter is optional. | ||||||||||||||||||
| Name: | Expands To: | 
|---|---|
| $web | Name of the web | 
| $ntopics | Number of topics found in current web | 
| $nhits | Number of hits if multiple="on". Cumulative across all topics in current web. Identical to$ntopicsunlessmultiple="on" | 
| $nor$n() | New line. Use $n()if followed by alphanumeric character, e.g. writeFoo$n()Barinstead ofFoo$nBar | 
| $nopor$nop() | Is a "no operation". This variable gets removed; useful for nested search | 
| $quot | Double quote ( ") (\" also works) | 
| $percnt | Percent sign ( %) | 
| $dollar | Dollar sign ( $) | 
format="..." parameter format="| $topic | $summary |"| $formfield(name, 30, ...) | Form field value, shortended to 30 characters with "..." indication | 
| $pattern(reg-exp) | A regular expression pattern to extract some text from a topic (does not search meta data; use $formfieldinstead). In case of amultiple="on"search, the pattern is applied to the line found in each search hit.• Specify a RegularExpression that covers the whole text (topic or line), which typically starts with .*, and must end in.*• Put text you want to keep in parenthesis, like $pattern(.*?(from here.*?to here).*)• Example: $pattern(.*?\*.*?Email\:\s*([^\n\r]+).*)extracts the e-mail address from a bullet of format* Email: ...• This example has non-greedy .*?patterns to scan for the first occurance of the Email bullet; use greedy.*patterns to scan for the last occurance• Limitation: Do not use .*)inside the pattern, e.g.$pattern(.*foo(.*)bar.*)does not work, but$pattern(.*foo(.*?)bar.*)does• Note: Make sure that the integrity of a web page is not compromised; for example, if you include an HTML table make sure to include everything including the table end tag | 
| $count(reg-exp) | Count of number of times a regular expression pattern appears in the text of a topic (does not search meta data). Follows guidelines for use and limitations outlined above under $pattern(reg-exp). Example:$count(.*?(---[+][+][+][+]) .*)counts the number of <H4> headers in a page. | 
| $ntopics | Number of topics found in current web. This is the current topic count, not the total number of topics | 
| $nhits | Number of hits if multiple="on". Cumulative across all topics in current web. Identical to$ntopicsunlessmultiple="on" | 
| $nor$n() | New line. Use $n()if followed by alphanumeric character, e.g. writeFoo$n()Barinstead ofFoo$nBar | 
| $nopor$nop() | Is a "no operation". This variable gets removed; useful for nested search | 
| $quot | Double quote ( ") (\" also works) | 
| $percnt | Percent sign ( %) | 
| $dollar | Dollar sign ( $) | 
%SEARCH{ "FAQ" scope="topic" nosearch="on" nototal="on" header="   * *Topic: Summary:*" format="   * [[$topic]]: $summary" }%%SEARCH{ "FAQ" scope="topic" nosearch="on" nototal="on" header="   * *Topic: Summary:*" format="   * [[$topic]]: $summary"  footer="   * *Topic: Summary*"  }% , TWiki:Main.CrawfordCurrie
, TWiki:Main.CrawfordCurrie
 , TWiki:Main.CrawfordCurrie
, TWiki:Main.CrawfordCurrie , TWiki:Main.SopanShewale
, TWiki:Main.SopanShewale
 
  
  Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.