First regex attempts

I would like to try to learn some basic rules regex, because that can make searching in Scrivener quite easier.

I want to find all documents (entries in the binder) whose name starts with a digit (0 - 9)

So I searched for

^\d

but it does not work. Can somebody help? Thanks a lot :slightly_smiling_face:

edit // Sorry, found the error. Of course I have to search only in the name.

2 Likes

^[0-9]*.

\d is not universally compatible with every regex flair, but the crux of the problem was an absent quantifier otherwise known as a repetition operator. The ยซ*ยป (asterisk) quantifier denotes any number of repetitions from 0 to infinity.

1 Like