Search with regex not working

I’m trying to search drafts using a regex “title:/1[0-9].*/”. However, I only get “{ } No drafts found”. Is that an invalid combination?

From the documentation on regex searching in Drafts.


Regular expression queries have to scan the entire text of drafts and can be a little slow on large datasets. If you find them performing poorly, consider using them when the draft list is already filtered by a workspace or tags, or combine them other search terms before them in a query, like tag:blue /regex/.

I think what you are trying to do is a regular expression match on a title rather than specify a title and regular expression match on the content of the draft. I’m not sure if it is then trying to do a match on a null title and the regex of trying to search for a title that contains the string that defines your regex.

You cannot combine regular expression search tokens with other markers like title:

You also don’t need to, as you are searching against the full content, so your regular expression could easily qualify such that it only matches in the first line.

Note that per the docs linked above, you are creating an expression that should match against the entire content of the draft, so your /1[0-9].*/ could already only be matching any drafts that start with 1 and another digit in the first line.