On Tuesday, December 1, 2020 at 12:09:38 PM UTC-8 [email protected] 
wrote:

> I am writing a macro with three parameters. If omitted, the third shall be 
> equal to the first one. This cannot be hardwired of course! So I need to 
> code it. With a filter.
> \define itemlist2(tag:"thème", field:"theme", excluding)
> <$set name="rejecting" filter="[$excluding$]+[regexp[^.]then[YES 
> $excluding$]else[NO $tag$]]">
> tag=$tag$, field=$field$, excluding=$excluding$, 
> rejecting=<<rejecting>>.<br>
> </$set>
> \end
>

Try using the !match[...] filter, like this:
\define itemlist2(tag:"thème", field:"theme", excluding)
<$set name="rejecting" filter="[[$excluding$]!match[]then[$excluding$]else[$
tag$]]">
tag=$tag$, field=$field$, excluding=$excluding$, 
rejecting=<<rejecting>>.<br>
</$set>
\end

-e

-- 
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/30d73458-c7cd-410d-bc59-cbc118d2a46cn%40googlegroups.com.

Reply via email to