Tags:
create new tag
view all tags

Question

Hi folks

I have the problem that searching with a regular expression with braces does not work.

This could easily reproduced on the page http://twiki.org/cgi-bin/view/TWiki/WebSearchAdvanced and enter the query "Welcome to Twiki" then you select "Regular expression search". You get now 2 Results. http://twiki.org/cgi-bin/search/TWiki/?search=Welcome+to+Twiki&scope=text&order=topic&regex=on&limit=all.

If you now change the regular Expresion to "Welcome to.{0,3}Twiki" and select "Regular expression search". You get now 0 Results. http://twiki.org/cgi-bin/search/TWiki/?search=Welcome+to.%7B0%2C3%7DTwiki&scope=text&order=topic&regex=on&limit=all

This is wrong because the regular expressin "Welcome to.{0,3}Twiki" matches at least "Welcome to Twiki".

I think this is a bug.

Environment

TWiki version: TWikiRelease04x00x05
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Search

-- FranzJoachimBraunbeck - 27 Nov 2006

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.

TWiki regular expression search is based on the egrep utility. Some egrep versions do not support a .{0,3} search. Make sure to upgrade to GNU egrep 2.5.1 or later. (This needs to be done here on twiki.org as well.)

-- PeterThoeny - 27 Nov 2006

Change status to:
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2006-11-27 - PeterThoeny
 
  • 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.