The Emacs documentation has a section on character classes. According to the manual, [:digit:] should match any digit character. I’ve tried that using re-builder but they never match, even though [0-9] matches.
How do I use character classes in an Emacs regex?
I figured it out. The documentation is actually explicit:
So
[[:digit:]]is the right way to use character classes.