Regex for 6 digit number

Matches a number with exactly 6 digit(s).

^\d{6}$

Proof it works

4/4 sample tests passed · compiles: true

SampleShould matchResult
307418 yes pass
3074185 no pass
30741 no pass
aaaaaa no pass

Try your own input

Related patterns