Skip to content

Filter for exact tag match like "tag is <tag>" #931

Closed Answered by claremacrae
punxsutawney asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

Now

Depending on how many other similar tags you have, you could now use multiple queries - like:

```tasks
tag includes #book
tag does not include #book/literature
tag does not include #book/fanfiction
```

Or you could combine them with boolean operators in to one line with:

(tag includes #book) AND NOT (tag includes #book/literature) AND NOT (tag includes #book/fanfiction)

Or as a short-cut:

tag includes #book
tag does not include book/

I don't have a good answer for the #A case.

In Future

It's worth your subscribing to #790 - regular expression search - as once that is released, you would be able to search for exact strings something like:

tag regex matches /^#a$/i

Which is:

tag:

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@punxsutawney
Comment options

Answer selected by punxsutawney
Comment options

You must be logged in to vote
2 replies
@punxsutawney
Comment options

@claremacrae
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
status: released Done, and included in a public release scope: filters Additions and modifications to the search filters scope: tags Anything to do with tags, both as `#` and in YAML frontmatter
2 participants