Regular Expressions For 4 Or 6 Digits

Category: Numbers | Views Total: 21 views

Regular Expressions that exactly match 4 or 6 digits, which are typically used in Pin Code.

4 Digits Regex:

/^[0-9]{4}$/

6 Digits Regex:

/^[0-9]{6}$/

See Also:

Rate This Regex
Sending
User Review
0 (0 votes)

Leave a Reply