Using browser tag search for SPECIFIC searches

The problem I am having with the browser is that when I try and search for a specific UWorld QID tag (e.g. “4362”), it will find any tags that have that string of numbers (e.g. “24362”). It will jump to the longer tag first, causing me to have to scroll through hundreds of tags to get to the initial “4362” tag that I was looking for in the first place. I wish there was a system where I could add quotes to the tag I am searching for and it would only find that exact tag. Attached are pictures to better explain what I mean.

1 Like

For a tag, to search just for that exact text, use tag:4362. If you want to search for a tag containing that text, you’d have to add wildcards to it, tag:*4362*. Searching - Anki Manual

2 Likes

That does not work in the tag search sidebar or the main browser search.


When searching like this, you need to use the full name of the tag, i.e., tag:AnKing::#AK\_Step2\_v12::#UWorld::4362

I recommend using the BetterSearch add-on so that you don’t need to type out the whole thing.

2 Likes

Okay, if you just want to filter the sidebar, you will use just the text 4362, with no “tag” label and Anki will highlight anything that matches. Browsing - Anki Manual

And thanks to @vaibhav for recognizing that you weren’t giving us the full tag name!

Without the full tag name, you can still use the wildcard search and even string them together (since it looks like you’re burdened with an overwhelming tag system in that deck). Like tag:*4362* -tag:2* will search for 4362 without getting 24362 (or anything else that starts with 2).

1 Like

I’m here to overcomplicate things by showing you what I like.

tl;dr:
tag:*::4362 might be the easiest if it’s under a parent tag.


For my examples, I’ll assume your conflicting tags are only these:

4362
24362

At this point, these searches will work to find 4362:

  1. tag:4362 – A simple search.
  2. tag:re:^4362 – An equivalent simple regex search (Anki manual link). The ^ indicates the start of the tag.
  3. tag:re:^4362$ – Another regex search. The $ indicates the end of the tag. This excludes any child tags. For example, this excludes notes that have the tag 4362::test but not 4362.

I’ll rename the tag so that there’s a parent tag like this:

UWorld_QID::4362
UWorld_QID::24362

At this point, these searches will work to find 4362:

  1. tag:UWorld_QID::4362 – A simple search.
  2. tag:re:^UWorld_QID::4362 – An equivalent simple regex search.
  3. tag:re:^UWorld_QID::4362$ – A regex search that excludes child tags of 4362. For example, this would exclude a note that has the tag UWorld_QID::4362::test but doesn’t have UWorld_QID::4362.
  4. tag:*::4362 – A simple search with a wildcard *. If another note was tagged with 4362 under another parent tag (e.g. ZA_WARUDO::4362), it would appear in results.
  5. tag:re:.*::4362 – A regex search with a wildcard .*. This is equivalent to number 4 and has the same issue.

I’ll rename the tag in order to split the parent tag like this:

UWorld::QID::4362
UWorld::QID::24362

At this point, these searches will work to find 4362:

  1. tag:UWorld::QID::4362 – A simple search still works.
  2. tag:re:^UWorld::QID::4362 – A simple regex search still works.
  3. tag:re:^UWorld::QID::4362$ – A regex search that excludes child tags still works.
  4. tag:UW*::4362 – A modification of number 1. We don’t need the full tag if there’s nothing that can conflict in the parent tag.
  5. tag:re:^UW.*::4362 – The equivalent regex search for number 4.
  6. tag:*::4362 – The wildcard search still works.
  7. tag:re:.*::4362 – The regex search with a wildcard .* still works.

Notes:
tag:*:4362 – The wildcard search still works without the full child tag indicator ::. I don’t recommend this practice, but the option’s available.
tag:re:.*::[4a]362 – This returns results for 4362 and a362. I don’t know if it’s useful to you, but I love this. For more info, read the Anki manual section for regex searches (link).

2 Likes