Launching a SaaS?·Collect waitlist signups before you build — before.run
SandboxPatternsDetectDocs
Address
en-US
#zip
#postal
#us
#address

US ZIP Code

Matches a US ZIP code in 5-digit or ZIP+4 (5-4) format.

US address formsShipping validationGeographic targeting
/
/
Test String
3 matches
\d{5}digit\d — digit (0–9) — repeated exactly 5 times · {5} — exactly 5 times
(…)?Group #1Capturing group — captures matched text for reuse or extraction — repeated zero or one time (optional) · ? — zero or one time (optional)
--'-' — literal character
\d{4}digit\d — digit (0–9) — repeated exactly 4 times · {4} — exactly 4 times
Pattern: 14 charsInput: 22 chars
100% client-side · private

Valid Examples

  • 90210
  • 10001-1234
  • 00501

Invalid Examples

  • 1234
  • 123456
  • 9021A