Using Regex with Notetype

I’ve got notes with notetypes such as Basic and Base. Is there any reason why a search as below wouldn’t find a match?

note:re:Bas

I expect the search result to include all note types with the characters “Bas” anywhere within the name of the notetype.

Even an exact search string such as below doesn’t match anything but removing “re:” (in the second instance), it does get the matches. So does re: not work with note:?

note:re:Basic
note:Basic

note:bas* would work. * is the equivalent of the regex [.\n]* and _ is the equivalent of [.\n], I believe.

It seems like regex is simply not supported with the note: search.

My exact guess… @dae can this be confirmed?

I stand to be corrected but inside a character class [], a dot has a literal meaning. Am assuming \n to also mean linefeed. With that said, may I ask what exactly is this [.\n]* hoping to match?

My bad. I should have used (.|\n)* instead. Basically, * matches ”<zero or more characters>” and _ matches “<one character>” in the words of the manual.

Yes, regex is not supported for note:. Here’s how it’s implemented for reference:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.