Searching based on tags

I have the following query:

WHERE contains(tags, "#p1") and !completed

When i run it, it does return all tasks that have a tag named #p1 but it also returns any other tasks that have #p1 in the tag i.e #p11, #p12, #p1-1 etc.

How can i make it to return only tasks that have just the tag i specify in the query not tags that contains the tag i am searching for as a substring of the tag.

For tasks the tags contains the entirety of the tags, so it should suffice to change to econtains() instead of just contains().

If you were using file.tags, I would also suggest switching to file.etags because of how the former splits up nested tags. But in your case that’s not an option, as tasks don’t even have the etags. :smiley:

Thank you that solved it.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.