Question
Hi,
I do not seem to be able to get the regex parameter to work in the
WebSearchAdvanced topic, although I can get it to work with the
%SEARCH variable.
I was looking for a character set value in one of our topics and could only remember the
WE8 bit of it. So I went to the
WebSearchAdvanced topic, checked the
Regular Expression Search checkbox, punched in
WE8.* and hit
Search. I got
Topics Found = 0.
I looked at the raw text and saw it was using the
%SEARCH variable so I created a test page and put the following search string in
%SEARCH{"WE8.*" web="all" type="regex"}%
And up came all the pages.
Looking at the
WebSearchAdvanced topic, it doesn't set
type="regex" when the
Regular Expression Search checkbox is checked, instead it sets
regex="on" which the
%SEARCH variable doesn't seem to use.
Obviously I could edit the
Twiki.WebSearchAdvanced topic and make a correction to the search function, but I'm unsure if it this is actually a bug in the topic or just a configuration issue that I don't yet know about.
Anyone any ideas on this?
Thanks in advance.
Environment
--
JamesStone - 26 Jun 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.
TWikibug:Item3295
and
TWikibug:Item5410
did report this earlier. It should be fixed in 4.2.1 (if it gets released

)
--
FranzJosefGigler - 27 Jun 2008
I didn't see those entries when I searched for this bug, but my question is answered so thanks.
Just though I would point out what I did to make regex work (until the official bugfix comes along)
1. Move to the TWiki web and raw edit the
WebSearchAdvanced topic
2. Change the SEARCH function at top by replacing the line for the url parameter
type with the following line
type="%IF{" '%URLPARAM{regex}%' = 'on' " then="regex" else="%URLPARAM{"type" default="word"}%"}%"
--
JamesStone - 01 Jul 2008