filter expression for text??

115 views
Skip to first unread message

HC Haase

unread,
May 2, 2018, 4:43:03 AM5/2/18
to TiddlyWiki
this is driving me crazy. so simple request but so hard to get working.

I have many tiddlers whit the same snippet of text, I want to find them and give them a tag (using the bachmanipulator or Batch search and replace field contents plugin).

in the standard search you can search in tiddler text whitout it having to be a exact match. How do I do that with a filter?? I want to find tiddlers that have a snippet of text (but maybe other text) and do not have tag x.

thanks

TonyM

unread,
May 2, 2018, 8:56:58 AM5/2/18
to TiddlyWiki
HC,

Its late here (Sydney) so I can only give some quick tips.

At tiddlywiki.com search for filter operators and have a look at the search operator and if your game using regex.

Also remember you can next $list widgets so the outercould search for tiddlers with text and the inner could filter out those without your desired tag so you apply two different filters.

<$list
<$list

</$list>
</$list>

When you are more expierenced you may be able to combine them into a single filter.

Eg [[first filter]] -[tag[tagname]

I hope this helps
Tony

Diego Mesa

unread,
May 2, 2018, 9:04:42 AM5/2/18
to TiddlyWiki
I think searching needs a huge overhall in TW!!! 

Mark S.

unread,
May 2, 2018, 9:40:01 AM5/2/18
to TiddlyWiki
It sounds like you want the search operator (https://tiddlywiki.com/#search%20Operator)

like ...search:text[MYSEARCHTEXT]...

-- Mark

HC Haase

unread,
May 3, 2018, 3:02:41 AM5/3/18
to TiddlyWiki
@Mark S
thanks that worked. As this is a quite a basic search, but useful with other filters (not only i the standard search) I think this should at least be included in the drop-down suggestions in the filer search. This operator was unknown to me despite I have used TW5 for years.

@Diego Mesa
I agree... or at least make it very easy for the average Joe to do some search and filtering (e.g. the drop-down filter suggestions).


Eric Shulman

unread,
May 3, 2018, 4:38:14 AM5/3/18
to TiddlyWiki
On Thursday, May 3, 2018 at 12:02:41 AM UTC-7, HC Haase wrote:
@Mark S
thanks that worked. As this is a quite a basic search, but useful with other filters (not only i the standard search) I think this should at least be included in the drop-down suggestions in the filer search. This operator was unknown to me despite I have used TW5 for years.

To add your own filters to the drop-down:

1) Create a new tiddler (e.g. "SomeName") tagged with "$:/tags/Filter"
2) add a "description" field containing "My Filter")
3) add a "filter" field containing "[search:text[MYSEARCHTEXT]]")
4) add a "list-before" field (leave it with a blank value)

The tag indicates that this is an entry for the filter drop-down.
The description is the text that appears in the drop-down.
The filter is the text to insert into the filter input field when the drop-down item is selected
The list-before field (with NO value) forces your custom filter to the top of the list (otherwise it would be at the end of the list)

enjoy,
-e
Eric Shulman
TiddlyTools.com: "Small Tools for Big Ideas!" (tm)
InsideTiddlyWiki: The Missing Manuals
Reply all
Reply to author
Forward
0 new messages