create new tag
, view all tags

SID-02257: Regex searches in UserList search box

Status: Asked Asked TWiki version: 6.0.2 Perl version: 5.10.1
Category: CategorySearch Server OS: CentOS 6.8, kernel 2.6.32 Last update: 1 year ago

How can I do regex searches in the Main. UserList topic? I have looked at the UserReports code and the type of search seems to be set up as regex but I have not been able to do searches with a simple regular expression pattern like !A for example.

-- TWiki Guest - 2016-10-06

Discussion and Answer

Can you provide an example of what you're trying to do? I don't know if the search parameter within %USERREPORTS% supports regex however you can perform a search of users using a regex search like:

%SEARCH{"META:FORM.*[U]serForm;META:FIELD.*[F]irstName.*Hank" web="%USERSWEB%" type="regex" nonoise="on" format="| $topic |" excludetopic="TWiki*"}%

The search string is made up of:
META:FORM.*[U]serForm Finds all topics containing a FORM called UserForm (this should identify all topics that are users)
META:FIELD.*[F]irst Name.*Hank Finds a field called First Name that contains the word Hank on the same line. You will want to modify this to be specific to whatever you're searching for.
; The search string is separated by a semi-colon which is a TWiki specific operator as per RegularExpression

Hope this helps smile

-- Jani Hamalainen - 2016-10-11

      Change status to:
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.
Status Asked
Title Regex searches in UserList search box
SupportCategory CategorySearch
TWiki version 6.0.2
Server OS CentOS 6.8, kernel 2.6.32
Web server Apache 2.2.15
Perl version 5.10.1
Browser & version Firefox 49.0.1
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2016-10-11 - JaniHamalainen
  • 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-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.