Regex for 7 digit number

Matches a number with exactly 7 digit(s).

^\d{7}$

Proof it works

4/4 sample tests passed · compiles: true

SampleShould matchResult
3074185 yes pass
30741852 no pass
307418 no pass
aaaaaaa no pass

Try your own input

Related patterns