diff --git a/src/utils/translate-address-to-english.ts b/src/utils/translate-address-to-english.ts index df03d6f..856f50b 100644 --- a/src/utils/translate-address-to-english.ts +++ b/src/utils/translate-address-to-english.ts @@ -105,7 +105,8 @@ export function translateAddressToEnglish( mutableAddress = mutableAddress.replace(numberMatch[0], ""); } - const floorMatch = mutableAddress.match(/(\d+) *樓/); + // match the floor part same as the number part + const floorMatch = mutableAddress.match(/((\d+)(-\d+)?) *樓/); if (floorMatch?.length) { parts.push(`${floorMatch[1]}F.`);