The tilde (~) operator was what I was missing. Thanks. On Thursday, December 12, 2019 at 10:08:14 PM UTC-6, Mark S. wrote: > > 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 tiddlywiki+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/1060f309-4756-404f-bc07-41304369e396%40googlegroups.com.