What is the deal with "space" in the search for a name?

I’m trying to find records whose name contains “BSR 2021-”. Which is a no-brainer with name:BSR 2021-, I get both existing records just fine.

Now, I’m a careful guy and know that naming can be sloppy, so there might be more than one space in the file name, like “BSR 2021-” (that’s two spaces, though you can’t see them). Consequently, I use name:BSR*2021-. Which leads to no record being found. Whereas the documentation says, “* matches none, one, or multiple characters”. In my mind, two spaces are “multiple characters”, so “*” should match them. It doesn’t.

OTOH, name:BSR* matches all records containing “BSR”, so it does match the initial space (and everything else after that).

Also, name:BSR[ ]2021-, where [ ] is a character class containing exactly one character, namely a space, doesn’t match any records. But syntactically, [ ] is very much the same as a single space character.

Apparently, I’m missing something here. How would I specify a robust search for a name containing “BSR” followed by an arbitrary number of arbitrary characters, followed by “2021-”?

BTW, the ? (matches exactly one character) does not match the space, either. And using quotes around the expression doesn’t help, either.

Extraneous spaces should be stripped IIRC.

Copy the name and paste it into a text document.
Then enable File > Show Invisible Characters.

Ah, now I see. You’re saying that I cannot even use two consecutive spaces in a filename because DT collapses them to one. Indeed, it does.

However, my irritation about * matching space sometimes (i.e. in “BSR*” matching everything after BSR, including the first space) and sometimes not (i.e. in the middle of the search string “BSR*2021-”) remains. As well as not understanding why [ ] doesn’t match a single space (which it should, according to documentation).

Criss would have to comment further on the specifics (and perhaps I need to adjust the documentation as well).

Redundant white spaces are indeed trimmed (also unnecessary ones at the beginning/end)

The search index doesn’t include spaces or separators, therefore the phrase “BSR 2021” matches all cases.