How to combine multiple tags in a search

As a novice user in Unix and Scripting, I am finding it hard going on searching for multiple tags and search terms in a document. Typically I would like to find say 2 or more tags with or without text searching and probably with exclusions too of other tags and text.

I have so far not been able to understand the node syntax sufficiently well and the queries that were possible with Taskpaper v2 are not supported.

For example, how to find in a document the lines with tags @review AND @overdue but excluding @waiting and containing the text ‘Legacy’. This is just an example (probably not actual) but that is the sort of thing I am after, combining text searches with tags and returning the parent level and matching children.

My current poor solution is to use BBEdit with multi file search and some grep, then open up the files in FT.

Many thanks.


Let’s build it up by stages:

  • Lines at any outline level containing legacy


  • Let’s add some more conditions
//(legacy and @review and @overdue)
  • Now let’s look at a different harvest, first those that do contain waiting. Again for any outline level we prefix with // (for just the top level we would use a single slash /).


  • And finally, let’s combine those two harvests with a set operator
//(legacy and @review and @overdue) except //@waiting

Alternatively, just combine two sets of conditions in a single harvest:

//(legacy and @review and @overdue) and (not @waiting)

This is working, thank you very much - much easier than I thought too, I was adding all sort of slashes and asterisks!

I suppose the next question is how to get the same type of lines returned but in more than one document, as I have not been able to get the CLI command working.

Thanks again.

Any ideas please on getting a list of tagged lines from multiple files without using CLI command (which I can’t get to work)?

Even a regexp that works would be good but I am struggling here (using BBEdit which gives me multi file searching).

I am looking to get as an example all lines as complexpoint showed me above, that is including one or more tags, but excluding others like @done or @low. Does this have to be a script or can regexp do it?

Many thanks.

Potential if long winded solution is to insert a whole folder of file’s contents into BBEdit, copy /paste into a new FT document then do a node search , but if it doesn’t going me the project or heading context, it would only be a partial solution !