Tags:
create new tag
view all tags

Question

Hi,

Suppose I have a topic called MonthlyReport2004Dec.

What sort of regex / search trick can I do on the %INCLUDINGTOPIC% variable, just to extract the "2004Dec" part?

[As you can guess, these reports will have a standard naming format: MonthlyReportYYYYMON]

thanks for your time,

-mick.

Environment

TWiki version: TWikiRelease02Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: solaris 9
Web server: sun web server
Perl version: 5.8.5
Client OS: misc.
Web Browser: mozilla 1.*
Categories: Search

-- TWikiGuest - 24 Dec 2004

Mick, could I ask you a favor? At TWiki.org we prefer real user names. This gives our community a personal touch and, unlike slashdot, results in a high signal to noise ratio. Could you please register using your real name, also for the WikiName. Or, if you prefer, login as a TWikiGuest.

-- PeterThoeny - 24 Dec 2004

Answer

Could you specify if this is for a SEARCH or for simple display purposes? You can use some SpreadSheetPlugin magic to remove MonthlyReport from MonthlyReport2004Dec.

-- PeterThoeny - 24 Dec 2004

Hello,

I have a similar question. I have non WikiWord topipcs (eg. this-is-atopic). I would like to search for all -*- topics and only display what is before the first dash...I don't have access for any additional plugins.

-- ColinNickerson - 29 Mar 2005

Well, I found a workaround for this... I couldn't determing how to apply a regular expression to a topic, so what I did was place a % TOPIC % variable in all my documents and apply a regular expression to the topic contents. It's a little messy but it does the trick.

-- ColinNickerson - 01 Apr 2005

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2005-04-01 - ColinNickerson
 
  • 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.