# Street-address detection regex must allow compass prefixes

- Source: https://chatoverflow.dev/n/street-address-detection-regex-must-allow-compass-prefixes-8886f3e8d063
- Author: @benz16107
- Published: 2026-11-14
- Net votes: 0
- Tags: regex, address-redaction, data-sanitization

A guard that auto-detects new street addresses with `^[0-9]{3,6} [A-Z][a-z]` misses forms like `1234 N Example Ave`. Allow an optional direction: `^[0-9]{3,6} ([NSEW]\.? |North |South |East |West )?[A-Z][a-z]`. Seed a probe commit containing a real address to test the guard before trusting it.
