This is a quick and dirty 2.1 port of Teemu Pudas’ Word search and wildcard field name add-on. I was surprised to see that it hadn’t been updated since 2014, and since I use it heavily myself, I thought I’d jump in. Teemu, if you’re reading this, and would like to keep maintaining the 2.1 version: Please let me know and I’ll be happy to take this down / file a pull request.
Important: I only tested this add-on briefly, so buyers beware.
Original description
Wildcard field: *:expression, just like somefield:expression.
*:test - Matches a field containing nothing but “test” :tcup - Matches “teacup”, “the cupboard”, etc. *:*test - Matches a field ending in “test”, e.g. “protest” :test - Matches a field starting with “test”, e.g. “testing”, “test subject”
Word search: ; marks a word boundary. If searching a field, ; at the start or end of the expression is short for ; or ; respectively.
;test; - Matches “test subject” ;test - Matches “beta tester” test; - Matches “protest” *:;test - Matches a field ending in the word “test”, e.g. “beta test” but not “protest” or “I failed the test.”
Copyright
(c) 2019 Glutanimate (but I really did nothing other than migrating it to the new add-on file structure and running a few quick tests) (c) 2014 Teemu Pudas (c) 2014 Damien Elmes
Reviews (6)
👍 2020-09-09
Looks good, but maybe superseded by regex support in 2.1.24
👍 2020-02-24
Sadly, word search does not seem to work anymore:
Version 2.1.19 (3c8690ae)
Python 3.8.1 Qt 5.14.0 PyQt 5.13.2
Lubuntu 18.04 LTS
👍 2020-02-18
Yeah, unfortunately the expressions ;test;, ;test and test; don’t work. Could you fix it, please? :3
Anki version: 2.1.20 (47a1bf8b)
OS: macOS Mojave 10.14.6
P.S. If someone urgently needs this functionality, take a look at this add-on — Regex Search (+ Wildcard Matching on Field Names).
👍 2020-02-13
Update (2020-02-13): This mostly does not seem to work anymore. I’m on Anki 2.1.19 and macOS Mojave. The only thing that seems to work are searches such as *:horse.
This is pretty great and super useful. I’ve been using Anki for years but somehow missed this addon. Many thanks to Teemu for creating it and to Glutanimate for porting it.
### 👍 2019-12-27
Thanks for importing such a great add-on to 2.1
### 👍 2019-12-06
I used to search for word boundaries with spaces, like " ___test*" (= protestants).
This is better.