Question
I am trying to search for hidden variables set within a page but do not get a result. What am doing wrong.
<!--
* Set MYVAR = OPEN
-->
on another page...
%SEARCH{"^ * MYVAR = OPEN" scope="text" regex="on"}%
Environment
--
BrianTibbels - 31 Mar 2008
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
The regex looks OK except that the
* needs to be escaped. It might be safer to search for whitespace since older TWiki versions saved bullets with a leading tab instead of three spaces. The
^ anchor does not work for some reason. Below is an example that works.
Search on this topic:
%SEARCH{ "[ \t]+\* MYVAR = OPEN" scope="text" topic="Search*" regex="on" nonoise="on" format="found <nop>$topic" }%
Resulting in:
found SearchWithinHTMLComments
--
PeterThoeny - 01 Apr 2008
Many thanks Peter - spot on.
--
BrianTibbels - 02 Apr 2008