Skip to content

Commit b478a73

Browse files
committed
southwest gas fix address cleaning
1 parent 4bee3cd commit b478a73

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/documentTypes/southwestGasBill.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ module.exports = {
5252
street_address_line_1 = rawText[lineWithCityStateZipCodeIndex - 1];
5353
}
5454

55+
const matchedZipCodeInAddress = /^(.*) (\d+-?\d+?)$/g.exec(street_address_line_1) || [];
56+
const [, cleanAddress] = matchedZipCodeInAddress;
57+
58+
if (cleanAddress) {
59+
street_address_line_1 = cleanAddress;
60+
}
61+
5562
const street_address_line_2 = '';
5663

5764
// city, state, zip code

0 commit comments

Comments
 (0)