A regular expression to match and validate Italian CAP postal codes, including V-(Vatican) and I- (Italy) prefixes.
/^(V-|I-)?[0-9]{5}$/
Matches:
- 00199
- V-00120
- I-00120
Non-matches:
- 0019
- 00 199
- v-00120
See Also:
Rate This Regex
User Review
( votes)Expression Flags
Flags | Description |
---|---|
i |
Ignore case sensitive. |
g |
Allows global search. |
m |
Allows multiline search. |