Regex for 1 digit number

Matches a number with exactly 1 digit(s).

^\d{1}$

Proof it works

4/4 sample tests passed · compiles: true

SampleShould matchResult
3 yes pass
30 no pass
no pass
a no pass

Try your own input

Related patterns