Search Operator in Tiddlywiki 5.2.1

I am experimenting with search operator in TW 5.2.1

Does regexp search mode really works like old regexp filter operator?

Q1. in create a tiddler with below wikitext! These two returns different results?

\define rxp() ^[a-z]+$

<$list filter="[!is[system]search:title:regexp<rxp>limit[5]]">



<$list filter="[!is[system]regexp:title<rxp>limit[5]]">


Q2. Why search operator has a caseinsensitive search-mode with regexp? why not use (?i)?

I would appreciate to share your thoughts!

1 Like

Note this works fine:

<$list filter="[!is[system]search:title:casesensitive,regexp<rxp>limit[5]]">


BUT then it is very confusing with pattern ^[a-z]+$.

The documentation is silent here!


You need this for the first one:

<$list filter="[!is[system]search:title:regexp,casesensitive<rxp>limit[5]]">


Why we need casesensitive when we use pattern like ^[a-z]+$? Don’t you think this confusing?

Perhaps, but the answer lies in the history of the search operator. Prior to 5.1.18, it was caseinsensitive only. When regex was added, it needed casesenstive support (which fits better with the regex support).

That’s my understanding, at least. Frankly, I’d move on – it’s not a bug.