I need REGEXP for alpha Numeric zip code, which contains minimum 3 & maximum 10 values.
- Invalid inputs are:
AAAAA
,A1
,AA
,12
,2A
- Valid inputs are:
123456
,123
,A1234
,A12
,A12A
,A9A
This is the regex I'm currently using:
/(^[A-z0-9]\d{3,10})+$/
It doesn't allow to specify only digits like this 12345
but input like A123
matches correctly.