diff --git a/client/src/components/trans-routes/RoutesDashboard.js b/client/src/components/trans-routes/RoutesDashboard.js index 65ba72e..1751bc2 100644 --- a/client/src/components/trans-routes/RoutesDashboard.js +++ b/client/src/components/trans-routes/RoutesDashboard.js @@ -111,10 +111,10 @@ const RoutesDashboard = () => { // Match route addresses against stored structured addresses without state/zip sensitivity. const normalizeAddressForMismatchCheck = (address) => { return normalizeAddress(address) - // Normalize unit identifiers like "Apt C-1" / "Apt C 1" to "Apt C1". - .replace(/([a-z])\s+(\d+)/g, '$1$2') .replace(/\b\d{5}(?:\s*\d{4})?\b/g, ' ') .replace(/\b(maryland|md|virginia|va)\b/g, ' ') + // Normalize unit identifiers like "Apt C-1" / "Apt C 1" to "Apt C1". + .replace(/\b(apt|apartment|unit|suite|ste)\s+([a-z])\s+(\d+)\b/g, '$1 $2$3') .replace(/\s+/g, ' ') .trim(); };