Here's my version:

<$list filter="[search{possearch}!search{negsearch}] ~[search{possearch}] 
-[[possearch]] -$:/HistoryList">
   <<currentTiddler>><br/>
</$list>

I changed $:/temp/possearch and $:/temp/negsearch for my research. I'm sure 
you'll see how to change them back. Because the possearch term will always 
contain the thing to be searched, it needed to be subtracted. Same for the 
HistoryList. 

This worked in my test, including when negsearch was not present.

HTH

On Thursday, December 12, 2019 at 11:01:16 AM UTC-8, Stephen Kimmel wrote:
>
> I want to combine a pair of search operators within a single filter where 
> one will be positive and the other negative. For example, I might want a 
> list of all the tiddlers that contain the word "Mark" but exclude all the 
> tiddlers that contain the word "temple." The solution I suspect would 
> involve an expression that looks something like 
>
> [search[Mark]!search[Temple]] 
>
> but, of course, I want to use variables in the expression. So what I have 
> at the moment has an expression that looks like this:
>
> search{$:/temp/possearch}!search{$:/temp/negsearch}
>
> The problem I'm having occurs when $:/temp/negsearch is either empty or 
> doesn't exist. In that set of circumstances, I get no matches. I would like 
> the search to act as though it were 
>
> search{$:/temp/possearch} 
>
> or 
>
> search{$:/temp/possearch}!search[xyz123]
>
> but I can't figure out how to do that.
>
> Any ideas?
>

-- 
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/f16ad19b-5d1a-4710-983f-fb1e5fcdd526%40googlegroups.com.

Reply via email to