has a fixed format for the search result, that is, a table consisting of topic names and topic summaries. Use the
parameter to specify a customized format of the search result. The string of the format parameter is typically a bullet list or table row containing variables (such as
).
1.
Use the header parameter to specify the header of a search result. It should correspond to the format of the format parameter. This parameter is optional.
2.
Use the format parameter to specify the format of one search hit.
Name: |
Expands To: |
$pattern(reg-exp) |
A regular expression pattern to extract some text from a topic. In case of a multiple="on" search, the pattern is applied to the line found in each search hit. For example, $pattern(.*?\*.*?Email\:\s*([^\n\r]+).*) extracts the email address from a bullet of format * Email: ... . |
$dollar |
Dollar sign ($ ) |
$quot |
Double quote (" ). Alternatively write \" to escape it |
$formfield(name, 10) |
Form field value, "- " hyphenated each 10 characters |
$formfield(name, 20, -<br />) |
Form field value, hyphenated each 20 characters with separator "-<br />" |
$formfield(name, 30, ...) |
Form field value, shortended to 30 characters with "..." indication |
$text |
Formatted topic text. In case of a multiple="on" search, it is the line found for each search hit. |
$nop or $nop() |
Is a "no operation". This variable gets removed; useful for nested search |
$locked |
LOCKED flag (if any) |
$username |
Login name of last topic update, like jsmith |
$web |
Name of the web |
$n or $n() |
New line |
$rev |
Number of last topic revision, like 1.4 |
$percnt |
Percent sign (% ) |
$formfield(name) |
The field value of a form field; for example, $formfield(TopicClassification) would get expanded to PublicFAQ . This applies only to topics that have a TWikiForm |
$date |
Time stamp of last topic update, like 03 Oct 2023 - 21:21 |
$isodate |
Time stamp of last topic update, like 2023-10-03T21:21Z |
$topic |
Topic name |
$topic(20) |
Topic name, "- " hyphenated each 20 characters |
$topic(30, -<br />) |
Topic name, hyphenated each 30 characters with separator "-<br />" |
$topic(40, ...) |
Topic name, shortended to 40 characters with "..." indication |
$summary |
Topic summary |
$wikiname |
Wiki user name of last topic update, like JohnSmith |
$wikiusername |
Wiki user name of last topic update, like Main.JohnSmith |
that scans from start to end and contains the text you want to keep in parenthesis, like
. You need to make sure that the integrity of a web page is not compromised; for example, if you include a table make sure to include everything including the table end tag.
Search can be nested. For example, search for some topics, then form a new search for each topic found in the first search. The idea is to build the nested search string using a formatted search in the first search.
Here is an example. Let's search for all topics that contain the word "culture" (first search), and let's find out where each topic found is linked from (second search).