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?