Devtools.supstudio.in

Tools/Regex

Digits

What this is

\d is 0-9. For a full number lexer you need optional fraction and exponent.

/[+-]?\d+/g
temp -3 and 42
3.14 is two matches with this pattern

Open in tester

FAQ

Unicode digits?
With flag u, \p{Nd} matches any decimal digit, not just ASCII.

Related