How do I match a substring from a previous filter result? Maybe I am thinking to complicated but regexp
gives me a really hard time here. Trying to create a suggestion list similar to how the fields dropdown work in Tiddler edit mode. Since I want to match case insensitive I have to construct the regular expression beforehand.
Json-Tiddler:
title: foo
record: item
type: application/json
{ "name": "myname", "location": "somewhere", "age": "too old" }
Now I have this construct:
# <temp> is an edit-text target tiddler
<ul>
<$list filter="[<temp>get[key]]" variable="key">
<$set name="pattern" value="(?i)<<key>>">
<!--<$set name="pattern" value="[(?i)<<key>>]">--> #same results
Key: <<key>>
Pattern: <<pattern>>
SHOULD: {{{ [indexes[]regexp[(?i)n]] }}} # returns the expected result
Result1: {{{ [indexes[]regexp<pattern>] }}} # blank
Result2: {{{ [indexes[]regexp[<pattern>]] }}} # blank
Result3: {{{ [indexes[]regexp[(?i)<key>]]}}} # blank
<$list filter="[record[item]!is[system]indexes[]] -[<key>] +[regexp<pattern>] +[sort[]]">
<li><$link overrideClass="tc-tiddlylink" /></li>
</$list>
</$set>
</$list>
</ul>
When entering ānā into the edit-text
I expect this result:
- name
- location
However I do not get any results and am banging my head for hours on end.