Regex for 5 digit number

Matches a number with exactly 5 digit(s).

^\d{5}$

Proof it works

4/4 sample tests passed · compiles: true

SampleShould matchResult
30741 yes pass
307418 no pass
3074 no pass
aaaaa no pass

Try your own input

Related patterns