Wildcards for exact match

I have many files/documents/items named in “YYYY-MM-DD some strings”

According to DEVONthink Manual,

?: Matches exactly one character
[a-b]: Matches one character of the range a through b

Assuming I have the following items:
2021-09
2021-09-01
2021-10
2021-10-01
2021-11
2021-11-01

If I search name:2021-??, I get nothing.

If I search name:2021-0?, I get 2021-09, 2021-09-01.

If I search name:2021-[0-9][0-9], I get all.

How can I get the search results of YYYY-MM, i.e. 2021-09, 2021-10, 2021-11?

E.g. use the condition Name begins with or the toolbar syntax name:<str

Begins with does not accept wildcards.

What I want to achieve is to find all YYYY-MM, i.e.2021-09, 2021-10, 2021-11. All of them. Not just one of them.

I have many files name using YYYY-MM-DD. So, every month I have 30/31 files. But I also have a file for each YYYY-MM. So, there are times that I just want to look at all the monthly files, i.e. YYYY-MM.

Using name:<2021-09 still gives 2 results: 2021-09-01, 2021-09. I do not want the 2021-09-01.

I cannot use name:<2021-0? or name:<2021-[0-9][0-9].

How can I get the search results of YYYY-MM, i.e. 2021-09, 2021-10, 2021-11, without all the other results of YYYY-MM-DD. That is I do not want 2021-09-01, 2021-10-01, 2020-11-01.

What do you want to do with the results? I’m asking because it would be fairly simple to find all records matching ^\d{4}-\d{2}$ (in RegEx parlance) with a script.

name:2021-[0-9][0-9] !2021-[0-9][0-9]-[0-9][0-9] should return them.

Which is a nice example why RegEx support might be a helpful addition :wink:

Thanks. This works perfectly.

I have daily journals and monthly journals. So, sometimes, I want to review the past monthly journals. This search allows me to quickly find all he monthly journals/files for review.

I am more familiar with linux filename wildcards. I was a bit surprise name:2021-[0-9][0-9] that didn’t work.

So, a more powerful wildcard search pattern will make search easier. Of course, RegEx support will be good.