I need a regular expression that validate for a number with length 4, 5, 6
I used ^[0-9]{4} to validate for a number of 4, but I do not know how to include validation for 5 and 6.
^[0-9]{4}
Try this:
^[0-9]{4,6}$
{4,6} = between 4 and 6 characters, inclusive.
{4,6}
1.4m articles
1.4m replys
5 comments
57.0k users