Tags:
create new tag
view all tags

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

TWiki version: TWikiRelease04x02x00
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: WIN32
Web server: Apache
Perl version: 5.10
Client OS: W2K
Web Browser: IE7
Categories: Search

-- BrianTibbels - 31 Mar 2008

Answer

ALERT! 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

Change status to:
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2008-04-02 - BrianTibbels
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.