Regular Expression For US Postal Codes

Category: Numbers | Views Total: 2 views

A regular expression to match and valid US.S five-digit and nine-digit (zip+4) postal codes.

4 Digits Regex:

/^\d{5}(?:[-\s]\d{4})?$/

Matches:

  • 12345
  • 12345-6789
  • 12345 6789

See Also:

Rate This Regex
Sending
User Review
0 (0 votes)

Leave a Reply