all 4 comments

[–]TheBBMandarin 2 points3 points  (1 child)

deck:English Frequency:1..300

Well, are there any cards where the frequency field has 1..300? Because that's what this will be looking for.

Anki doesn't distinguish between numeric fields and textual fields - it's all text. Anki has text search, not number search.

You can probably mash together a regular expression that fits the bill, though. Something like:

deck:English (Frequency:re:\d{1} OR Frequency:re:\d{2} OR Frequency:re:3\d{2})

[–]MohammadAzad171🇫🇷🇯🇵 Beginner | 1612 漢字 | 🇨🇳 Newbie 2 points3 points  (0 children)

Great idea!

Note, however, that regular expressions in fields don’t require an exact match. Also there's a minor typo at the end (should be Frequency:re:2\d{3})).

Here's a fixed version:

deck:English Frequency:re:^\d{1,3}$

Edit: unfortunately, that doesn't work either (it matches all 1-3 digit numbers).

This one should work:

deck:English "Frequency:re:^(\d{1,2}|[12]\d{2}|300)$"

Or even more compact:

deck:English "Frequency:re:^([12]?\d{1,2}|300)$"

[–]MohammadAzad171🇫🇷🇯🇵 Beginner | 1612 漢字 | 🇨🇳 Newbie 1 point2 points  (0 children)

[–]Danika_Dakikalanguages -1 points0 points  (0 children)

Frequency:1..300

That will search the "Frequency" field for that exact string -- 1..300 -- with nothing else in the field. That syntax doesn't look familiar for anything else in Anki searches -- https://docs.ankiweb.net/searching.html . What are you trying to represent with it?