/&.*$/RegExpedia

Pattern: Zip Code

Patterns for matching postal/zip codes

ttheIntuitionist3/26/2025

Regular Expressions

^[0-9]{5}(?:-[0-9]{4})?$

ttheIntuitionist3/26/2025

Matching Strings

Matches?TextDescriptionAuthor
12345Basic 5-digit formatttheIntuitionist
12345-6789ZIP+4 formatttheIntuitionist

Non-matching Strings

Matches?TextDescriptionAuthor
1234Too few digitsttheIntuitionist
123456Too many digitsttheIntuitionist
12345-123Invalid ZIP+4 formatttheIntuitionist