Filter or expression when a tiddler is contained in list field

Let’s say I have a title list that might have a series like: 102 400 780 790

and I have list field mylist in a tiddler mytiddler with the contents like 780 790. What sort of filter could do:

400 780 +[mycontains{mytiddler!!mylist}] → 780
400 102 +[mycontains{mytiddler!!mylist}] → [empty set]

In other words, I want those tiddlers that are contained in a list field. And in case you’re checking, the contains operator doesn’t do that.

So far the only thought I’ve had is that I could create a regular expression on the fly and then use that with the regular expression search (e.g. [^780$|^790$] ) But I’m hoping that there’s something better that I’ve missed.

Thanks!

1 Like

You can use the :intersection[...] filter run prefix, like this:

{{{ 400 780 :intersection[enlist{mytiddler!!mylist}] ~[[empty set]] }}}

enjoy,
-e

5 Likes

Thanks Eric! I may have to revisit this when I have my project built up better.