Thanks to an other post on the list, I've been able to solve my problem. First, the solution: using the splitregexp filter operator!
example: (transform something like "SVR203" into "SVR") <$set name="codeFamily" filter="[[$ref$]splitregexp[\d+]join[]]"> Now, the cause of my trouble: Looking for a regexp, I seartch into the string operators. Only had a glance at other operator afterwards. Missed that splitregexp operator in the middle of the first batch of operator (which have no general purpose given like strings operators for instance). Only saw the regexp operator, which was not what I needed. Suggestion: the regexp operator notice could hint at the splitregexp operator! Le mardi 22 septembre 2020 à 23:55:48 UTC+2, Jean-Pierre Rivière a écrit : > I'd like to modify some titles via a filter using a regexp. More > precisely, I'd like to transform things like R42 or TH37 in R or TH. > > in bash I would do > echo $title | sed -e 's/\d+$//' > > in TW I found rgexp to match titles but nothing to modify via a regexp. Or > anything that could be used for my purpose. How should I proceed? > > One I got those suffix like R or TH, I pla to use a dictionnary to > transform them into the bits of URL I am trying to build. > > In my previous attempts, I used the prefix operator, but this imply to > know the prefix. Here, I don't want to know it and so cannot use the prefix > operator. > > TIA! > > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/0b14d8f7-157b-49a9-88ed-a9cf26579679n%40googlegroups.com.

