Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Search Pattern Cookbook | ||||||||
Line: 188 to 188 | ||||||||
However, the $parent link fails if the topic has no parent set ($parent will be empty). You can use some TWiki:Plugins/SpreadSheetPlugin![]() WebHome : | ||||||||
Changed: | ||||||||
< < | $percntCALC{$IF($EXACT($parent,),,$NOP( * $parent))}$percnt | |||||||
> > | $percntCALCULATE{$IF($EXACT($parent,), , $NOP( * $parent))}$percnt | |||||||
So the total Search query to find a topic's parent topic is: | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
Test CaseThe parent topic of this topic is: | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
Solution 3: Using IF statementThis pattern can be rewritten using%IF% , removing the dependency on SpreadSheetPlugin: | ||||||||
Line: 255 to 255 | ||||||||
Test case | ||||||||
Added: | ||||||||
> > | ||||||||
Public webs of TWiki. | ||||||||
Changed: | ||||||||
< < | Search: WebHome
Number of topics: 1 <--/patternSearchResultCount--> Number of topics: 1 <--/patternSearchResultCount--> Number of topics: 1 <--/patternSearchResultCount--> Number of topics: 1 <--/patternSearchResultCount--> Number of topics: 1 <--/patternSearchResultCount--> Number of topics: 1 <--/patternSearchResultCount--> Number of topics: 1 <--/patternSearchResultCount--> | |||||||
> > | Search: WebHome
Number of topics: 1 <--/patternSearchResultCount--> Number of topics: 1 <--/patternSearchResultCount--> Number of topics: 1 <--/patternSearchResultCount--> Number of topics: 1 <--/patternSearchResultCount--> Number of topics: 1 <--/patternSearchResultCount--> Number of topics: 1 <--/patternSearchResultCount--> Number of topics: 1 <--/patternSearchResultCount--> | |||||||
Line: 269 to 270 | ||||||||
![]() Exclude web from a web="all" search setting in the relevant web's WebPreferences topic.
Alternative solution | ||||||||
Added: | ||||||||
> > | ||||||||
This result can also be accomplished with the %WEBLIST% variable. | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Search Pattern Cookbook | ||||||||
Line: 105 to 105 | ||||||||
Solution 1: Appropriate for Sep 2004 TWiki (Cairo) | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
Line: 116 to 116 | ||||||||
Which expands to this: (here limited to all Z* users because TWiki.org has so many) | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
Changed: | ||||||||
< < | This searches all topics in the Main web that contain "Name", "Email" and "Country" bullets. Alternatively, do a FormattedSearch with multiple="on" on the Main.TWikiUsers topic. | |||||||
> > | This searches all topics in the Main web that contain "Name", "Email" and "Country" bullets. Alternatively, do a FormattedSearch with multiple="on" on the Main.TWikiUsers topic. | |||||||
Solution 2: As Solution 1, but with possibility for multi-selecting usernames | ||||||||
Line: 136 to 136 | ||||||||
Please note that the Search pattern is unchanged compared to Solution 1. The change is in the HTML form element. The abovementioned modification is, in effect: | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
Line: 149 to 149 | ||||||||
When the User information is stored in a UserForm (as is default in Dakar) then this list can be generated as follows: | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
Changed: | ||||||||
< < |
Number of topics: 547 <--/patternSearchResultCount--> | |||||||
> > |
Number of topics: 547 <--/patternSearchResultCount--> | |||||||
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
| |||||||
Search Pattern CookbookThe Search function in TWiki is very powerful. Especially searches using a RegularExpression play an important part of tapping TWiki's full potential. Unfortunately RegularExpressions can be incredibly obscure to the uninitiated. Most people not familiar (enough) with Regular Expressions mostly cut and paste (and maybe tweak) from existing examples. This page intends to collect lots of examples together. | ||||||||
Changed: | ||||||||
< < | On this page:
| |||||||
> > | On this page:
| |||||||
Added: | ||||||||
> > | <--
| |||||||
Pattern 1: Extract values from a tableProblem definition | ||||||||
Line: 22 to 26 | ||||||||
How to extract the 'name' values, i.e. 'option1', 'option2' and 'option3' and put them in a HTML form select input?
Solution | ||||||||
Added: | ||||||||
> > | ||||||||
The following search pattern can be employed:
<form> <select> | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
Line: 35 to 40 | ||||||||
which is, in effect: | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
Deleted: | ||||||||
< < | ||||||||
Added: | ||||||||
> > |
<--
| |||||||
Pattern 2: List generated from form classificationProblem | ||||||||
Line: 61 to 70 | ||||||||
%SEARCH{"[T]opicClassification.*value\=.*Two;[T]opicStatus.*value\=.*%URLPARAM{type}%" | ||||||||
Changed: | ||||||||
< < | regex="on" casesensitive="on" nosearch="on" | |||||||
> > | type="regex" casesensitive="on" nosearch="on" | |||||||
format=" * $topic -
last modified by $wikiusername on $date $formfield(TopicStatus) " | ||||||||
Line: 75 to 84 | ||||||||
Filter: | ||||||||
Changed: | ||||||||
< < | %SEARCH{ "^\|[^\|]*\| *option *\|" topic="TopicClassification" web="TWiki" regex="on" | |||||||
> > | %SEARCH{ "^\|[^\|]*\| *option *\|" topic="TopicClassification" web="TWiki" type="regex" | |||||||
multiple="on" nosearch="on" nototal="on" format="" }% | ||||||||
Line: 83 to 92 | ||||||||
This will create similar functionality as TWiki:Plugins.TopicClassificationAddOn![]() | ||||||||
Deleted: | ||||||||
< < | ||||||||
Added: | ||||||||
> > |
<--
| |||||||
Pattern 3: Creating lists of TWiki usernamesProblem | ||||||||
Line: 133 to 145 | ||||||||
Solution 3: Appropriate for TWiki 4 (Dakar) | ||||||||
Added: | ||||||||
> > | ||||||||
When the User information is stored in a UserForm (as is default in Dakar) then this list can be generated as follows:
<form name="testing" action="%SCRIPTURLPATH{"view"}%/%MAINWEB%" method="get"> <select name="topic"> <option>Select user...</option> | ||||||||
Changed: | ||||||||
< < |
Number of topics: 547 <--/patternSearchResultCount--> | |||||||
> > |
Number of topics: 547 <--/patternSearchResultCount--> | |||||||
Line: 149 to 162 | ||||||||
| ||||||||
Added: | ||||||||
> > |
<--
| |||||||
Pattern 4: Extract the parent of a given topicProblemHow to get to the parent of the current topic to display on the page? | ||||||||
Changed: | ||||||||
< < | Solution | |||||||
> > | Solution 1: Using METASince TWiki 4.0 you can now use the META variable:%META{ "parent" dontrecurse="on" }%
Solution 2: Using SpreadSheetPlugin | |||||||
You might think that the following Search would do the trick: | ||||||||
Changed: | ||||||||
< < | parent_link | |||||||
> > | ||||||||
Changed: | ||||||||
< < | However, the [[$parent][parent_link]] link fails if the topic has no parent set ($parent will be empty). You can use some SpreadSheetPlugin magic to conditionally link to the parent or to WebHome : [[$percntCALC{$IF($EXACT($parent,), %HOMETOPIC%, $parent)}$percnt][parent_link]] | |||||||
> > | However, the $parent link fails if the topic has no parent set ($parent will be empty). You can use some TWiki:Plugins/SpreadSheetPlugin![]() WebHome :
$percntCALC{$IF($EXACT($parent,),<nop>,$NOP( * $parent))}$percnt | |||||||
So the total Search query to find a topic's parent topic is: | ||||||||
Changed: | ||||||||
< < | [[FormattedSearch][parent_link]] | |||||||
> > |
Test CaseThe parent topic of this topic is:Solution 3: Using IF statementThis pattern can be rewritten using%IF% , removing the dependency on SpreadSheetPlugin:
%SEARCH{ "^%BASETOPIC%$" web="%BASEWEB%" scope="topic" type="regex" nonoise="on" format="$percntIF{$quot$parent$quot then=$quot * $parent$quot else=$quot<nop>$quot}$percnt" }% | |||||||
Changed: | ||||||||
< < | Test CaseThe parent topic of this topic is: FormattedSearch | |||||||
> > | Test CaseThe parent topic of this topic is: | |||||||
Changed: | ||||||||
< < | Pattern 5: Search and display the home topics of public webs in a list | |||||||
> > |
<--
Pattern 5: Show all Children of a given topicProblemHow to get to the list of all children of the current topic to display on the page?SolutionThe parent information is stored in the META:TOPICPARENT meta data. Do a SEARCH to find all topic parent meta data pointing to the current topic:Children: %SEARCH{ "META\:TOPICPARENT.*\"%TOPIC%\"" type="regex" nonoise="on" format="[[$topic]]" separator=", " }%Note: Replace %TOPIC% with %BASETOPIC% if you put this SEARCH into the skin or a sidebar.
<--
Pattern 6: Search and display the home topics of public webs in a list | |||||||
Problem | ||||||||
Line: 218 to 280 | ||||||||
Changed: | ||||||||
< < | Pattern 6: Extract a value from a bullet list | |||||||
> > |
<--
Pattern 7: Create a select box with values from a bullet listProblemWe have a topic with a bullet list with category names. In another topic we want to offer these values in a select box dropdown. For example, CategoryList has:
SolutionThe following search pattern can be employed:<select name="type"> <option>Select category...</option> %SEARCH{" *\s*.*?" topic="CategoryList" type="regex" multiple="on" casesensitive="on" nosummary="on" nosearch="on" noheader="on" nototal="on" format="<option>$pattern(.* \*\s*([^\n]*).*)</option>"}% </select>To render the bullet list as a comma-separated list, use the separator parameter:
%SEARCH{" *\s*.*?" topic="CategoryList" type="regex" multiple="on" casesensitive="on" nosummary="on" nosearch="on" noheader="on" nototal="on" separator="," format="$pattern(.* \*\s*([^\n]*).*)"}% <--
Pattern 8: Extract a value from a named bullet list item | |||||||
Problem | ||||||||
Line: 229 to 325 | ||||||||
Search for the Name: entry. | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
Test case | ||||||||
Line: 240 to 336 | ||||||||
Search result: | ||||||||
Changed: | ||||||||
< < | ||||||||
> > |
<--
Pattern 9: Search for Form and Meta data: explained | |||||||
Deleted: | ||||||||
< < | Pattern 7: Search for Form and Meta data: explained | |||||||
Problem | ||||||||
Added: | ||||||||
> > | ||||||||
Below is an example of a search that searches form data. The questions are:
| ||||||||
Changed: | ||||||||
< < | %SEARCH{ "[S]tatus.*(td..td|value\=).*[W]aiting" casesensitive="on" regex="on" | |||||||
> > | %SEARCH{ "[S]tatus.*(td..td|value\=).*[W]aiting" casesensitive="on" type="regex" | |||||||
nosearch="on" nototal="on" format="| $topic<br /> ($date - $rev - Diffs) |"}% | ||||||||
Line: 263 to 365 | ||||||||
So a search for a form field could look like:
| ||||||||
Changed: | ||||||||
< < | %SEARCH{ "[O]peratingSystem.*value\=.*[O]sWin" regex="on" ... }% | |||||||
> > | %SEARCH{ "[O]peratingSystem.*value\=.*[O]sWin" type="regex" ... }% | |||||||
| ||||||||
Line: 274 to 376 | ||||||||
The following search finds topics in the old and new format:
| ||||||||
Changed: | ||||||||
< < | %SEARCH{ "[O]peratingSystem.*(td..td|value\=).*[O]sWin" regex="on" ... }% | |||||||
> > | %SEARCH{ "[O]peratingSystem.*(td..td|value\=).*[O]sWin" type="regex" ... }% | |||||||
The td..td matches td<>td ; a simple search on "[O]peratingSystem.*[O]sWin" could find a hit in the topic text by coincidence.
A simple %SEARCH{ "[O]peratingSystem.*value\=.*[O]sWin" ...}% search is sufficient if you do not have topics in the old format. | ||||||||
Changed: | ||||||||
< < | Pattern 8: Search all topics that have been moved | |||||||
> > |
<--
Pattern 10: Search all topics that have been moved | |||||||
Problem | ||||||||
Added: | ||||||||
> > | ||||||||
How would I go about listing all moved topics ?
Solution | ||||||||
Line: 286 to 393 | ||||||||
How would I go about listing all moved topics ?
Solution | ||||||||
Added: | ||||||||
> > | ||||||||
Search for the META:TOPICMOVED meta data. Type this: | ||||||||
Changed: | ||||||||
< < | Moved topics: %SEARCH{ "%META\:TOPICMOVED" regex="on" format="$topic, " nosearch="on" noheader="on" nosummary="on" }% | |||||||
> > | Moved topics: %SEARCH{ "%META\:TOPICMOVED" type="regex" format="$topic, " nosearch="on" noheader="on" nosummary="on" }% | |||||||
to get this (limited to 10 results): | ||||||||
Changed: | ||||||||
< < | Moved topics: Number of topics: 0 <--/patternSearchResultCount--> Contributors | |||||||
> > | Moved topics: Number of topics: 0 <--/patternSearchResultCount--> | |||||||
Changed: | ||||||||
< < | TWiki:Main.AntonAylward![]() ![]() ![]() ![]() ![]() | |||||||
> > | Related Topics: UserDocumentationCategory, SearchHelp, TWikiVariables#VarSEARCH, FormattedSearch, RegularExpression | |||||||
Changed: | ||||||||
< < | Related Topics: UserDocumentationCategory | |||||||
> > | -- Contributors: TWiki:Main.AntonAylward![]() ![]() ![]() ![]() ![]() |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Search Pattern CookbookThe Search function in TWiki is very powerful. Especially searches using a RegularExpression play an important part of tapping TWiki's full potential. Unfortunately RegularExpressions can be incredibly obscure to the uninitiated. | ||||||||
Line: 85 to 85 | ||||||||
This will create similar functionality as TWiki:Plugins.TopicClassificationAddOn![]() | ||||||||
Changed: | ||||||||
< < | Pattern 3a: listbox with all user names | |||||||
> > | Pattern 3: Creating lists of TWiki usernames | |||||||
ProblemHow to populate a list box with all usernames of registered TWiki users | ||||||||
Changed: | ||||||||
< < | Solution | |||||||
> > | Solution 1: Appropriate for Sep 2004 TWiki (Cairo) | |||||||
<form name="testing" action="%SCRIPTURLPATH{"view"}%/%MAINWEB%" method="get"> | ||||||||
Line: 115 to 115 | ||||||||
This searches all topics in the Main web that contain "Name", "Email" and "Country" bullets. Alternatively, do a FormattedSearch with multiple="on" on the Main.TWikiUsers topic. | ||||||||
Changed: | ||||||||
< < | Pattern 3b: listbox with all user names - select multiple namesProblemSuppose you want to send mail from a form on topic page to a selected list of multiple TWikiUsersSolutionThe example of Pattern 3a produces the list box. Add a MULTIPLE to the select statement, i.e.: | |||||||
> > | Solution 2: As Solution 1, but with possibility for multi-selecting usernamesThe example of Solution 1 produces the list box. Add a MULTIPLE to the select statement, i.e.: | |||||||
<select name="topic" size="2" MULTIPLE> | ||||||||
Changed: | ||||||||
< < | Please note that the Search pattern is unchanged compared to Pattern 3a. The change is in the HTML form element. | |||||||
> > | Please note that the Search pattern is unchanged compared to Solution 1. The change is in the HTML form element. | |||||||
Changed: | ||||||||
< < | Test caseThe Search pattern 3a with the abovementioned modification is, in effect: | |||||||
> > | The abovementioned modification is, in effect: | |||||||
Line: 139 to 132 | ||||||||
Added: | ||||||||
> > | Solution 3: Appropriate for TWiki 4 (Dakar)When the User information is stored in a UserForm (as is default in Dakar) then this list can be generated as follows:<form name="testing" action="%SCRIPTURLPATH{"view"}%/%MAINWEB%" method="get"> <select name="topic"> <option>Select user...</option> %SEARCH{"%META:FORM.*[U]serForm" web="%MAINWEB%" regex="on" casesensitive="on" nosearch="on" format="<option>$topic</option>" sort="topic" excludetopic="Test*, TWiki*"}% </select> <input type="submit" value="Go" /> </form>In the above example:
| |||||||
Pattern 4: Extract the parent of a given topic |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Search Pattern CookbookThe Search function in TWiki is very powerful. Especially searches using a RegularExpression play an important part of tapping TWiki's full potential. Unfortunately RegularExpressions can be incredibly obscure to the uninitiated. |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > | Search Pattern CookbookThe Search function in TWiki is very powerful. Especially searches using a RegularExpression play an important part of tapping TWiki's full potential. Unfortunately RegularExpressions can be incredibly obscure to the uninitiated. Most people not familiar (enough) with Regular Expressions mostly cut and paste (and maybe tweak) from existing examples. This page intends to collect lots of examples together.On this page:
Pattern 1: Extract values from a tableProblem definitionSuppose there is a topic with a table defining entries in a TWikiForm. I.e. they define select menu items in a form template. They are then formatted like:| *Name* | *Type* | *Tooltip message* | | option1 | option | | | option2 | option | | | option3 | option | |How to extract the 'name' values, i.e. 'option1', 'option2' and 'option3' and put them in a HTML form select input? SolutionThe following search pattern can be employed:<form> <select> %SEARCH{ "^\|[^\|]*\| *option *\|" topic="%TOPIC%" regex="on" multiple="on" nosearch="on" nototal="on" format="<option>$pattern(^\| *(.*?) *\|.*)</option>" }% </select> </form>which is, in effect: Pattern 2: List generated from form classificationProblemImagine a TWiki form-based topic classification, i.e. every page has a form with several fields. How to:
Test caseIn practice:Image a TWiki form with two fields:
Solution%SEARCH{"[T]opicClassification.*value\=.*Two;[T]opicStatus.*value\=.*%URLPARAM{type}%" regex="on" casesensitive="on" nosearch="on" format=" * $topic - <font face=\"arial,helvetica\" size=\"1\"> _last modified by_ $wikiusername _on_ $date </font> %BR% <font face=\"arial,helvetica\" size=\"1\"> $formfield(TopicStatus) </font>" sort="topic"}%The filtering select dialogue is created as in Pattern 1: %STARTSIDEBAR% *Filter:* %BR% <form name="selectType" action="%SCRIPTURLPATH{"view"}%/%WEB%/" > <select name="type" size="1" onchange="document.location=this.value;"> %SEARCH{ "^\|[^\|]*\| *option *\|" topic="TopicClassification" web="%WEB%" regex="on" multiple="on" nosearch="on" nototal="on" format="<option value=%INCLUDINGTOPIC%?type=$pattern(^\| *(.*?) *\|.*)>$pattern(^\| *(.*?) *\|.*)</option>" }% <option value=%INCLUDINGTOPIC%>All pages</option> </select> </form> %STOPSIDEBAR%This will create similar functionality as TWiki:Plugins.TopicClassificationAddOn ![]() Pattern 3a: listbox with all user namesProblemHow to populate a list box with all usernames of registered TWiki usersSolution<form name="testing" action="%SCRIPTURLPATH{"view"}%/%MAINWEB%" method="get"> <select name="topic"> <option>Select user...</option> %SEARCH{ "Name:;Email:;Country:" web="%MAINWEB%" type="regex" nosearch="on" nototal="on" format="<option>$topic</option>" }% </select> <input type="submit" value="Go" /> </form>Which expands to this: (here limited to all Z* users because TWiki.org has so many) This searches all topics in the Main web that contain "Name", "Email" and "Country" bullets. Alternatively, do a FormattedSearch with multiple="on" on the Main.TWikiUsers topic.
Pattern 3b: listbox with all user names - select multiple namesProblemSuppose you want to send mail from a form on topic page to a selected list of multiple TWikiUsersSolutionThe example of Pattern 3a produces the list box. Add a MULTIPLE to the select statement, i.e.:<select name="topic" size="2" MULTIPLE>Please note that the Search pattern is unchanged compared to Pattern 3a. The change is in the HTML form element. Test caseThe Search pattern 3a with the abovementioned modification is, in effect:Pattern 4: Extract the parent of a given topicProblemHow to get to the parent of the current topic to display on the page?SolutionYou might think that the following Search would do the trick:%SEARCH{ "^%BASETOPIC%$" scope="topic" nosearch="on" type="regex" nototal="on" format="[[$parent][parent_link]]" }%However, the [[$parent][parent_link]] link fails if the topic has no parent set ($parent will be empty). You can use some SpreadSheetPlugin magic to conditionally link to the parent or to WebHome : [[$percntCALC{$IF($EXACT($parent,), %HOMETOPIC%, $parent)}$percnt][parent_link]]
So the total Search query to find a topic's parent topic is:
%SEARCH{ "^%BASETOPIC%$" scope="topic" nosearch="on" type="regex" nototal="on" format="[<nop>[$percntCALC{$IF($EXACT($parent,), <nop>%HOMETOPIC%, $parent)}$percnt][parent_link]]" }% Test CaseThe parent topic of this topic is: FormattedSearchPattern 5: Search and display the home topics of public webs in a listProblemHow to find and display public webs in a drop down list box.SolutionThanks to TWiki:Main.PeterThoeny![]() <form> <select name="topic"> <option value="%TOPIC%">Select...</option> %SEARCH{ "%HOMETOPIC%" scope="topic" web="all" topic="%HOMETOPIC%" format="<option value=\"$web.$topic\">$web</option>" separator=" " }% </select> <input type="submit" value="Go" /> </form> Test casePublic webs of TWiki.![]() Exclude web from a web="all" search setting in the relevant web's WebPreferences topic.
Alternative solutionThis result can also be accomplished with the %WEBLIST% variable.Pattern 6: Extract a value from a bullet listProblemDisplay the user name in the user's topic titleSolutionSearch for theName: entry.
%SEARCH{" * [N]ame: " topic="%TOPIC%" regex="on" casesensitive="on" nosummary="on" nosearch="on" noheader="on" nototal="on" format="---+!! $pattern(.* \* Name: ([^\n]*).*)"}% Test caseTo create a test case, we will put a name entry here:
Pattern 7: Search for Form and Meta data: explainedProblemBelow is an example of a search that searches form data. The questions are:
%SEARCH{ "[S]tatus.*(td..td|value\=).*[W]aiting" casesensitive="on" regex="on" nosearch="on" nototal="on" format="| [[$topic]]<br /> ($date - $rev - [[%SCRIPTURLPATH{rdiff}%/$web/$topic][Diffs]]) |"}% Solution%SEARCH depends on grep, and grep searches the whole file, including the meta data. An example meta data form field is:%META:FIELD{name="OperatingSystem" title="OperatingSystem" value="OsWin"}%So a search for a form field could look like: %SEARCH{ "[O]peratingSystem.*value\=.*[O]sWin" regex="on" ... }%
<td valign="top" align="right"> OperatingSystem: </td><td> OsWin </td>The following search finds topics in the old and new format: %SEARCH{ "[O]peratingSystem.*(td..td|value\=).*[O]sWin" regex="on" ... }%The td..td matches td<>td ; a simple search on "[O]peratingSystem.*[O]sWin" could find a hit in the topic text by coincidence.
A simple %SEARCH{ "[O]peratingSystem.*value\=.*[O]sWin" ...}% search is sufficient if you do not have topics in the old format.
Pattern 8: Search all topics that have been movedProblemHow would I go about listing all moved topics ?SolutionSearch for the META:TOPICMOVED meta data. Type this:Moved topics: %SEARCH{ "%META\:TOPICMOVED" regex="on" format="$topic, " nosearch="on" noheader="on" nosummary="on" }%
to get this (limited to 10 results):
Moved topics: Number of topics: 0 <--/patternSearchResultCount--> ContributorsTWiki:Main.AntonAylward![]() ![]() ![]() ![]() ![]() |