From 004a2f3a445d7c7a227a1091149c83088658acaf Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 17 Feb 2016 10:55:03 -0500 Subject: [PATCH] JBAS-984 Address normalizer street => st Signed-off-by: Bill Erickson --- Open-ILS/src/perlmods/lib/OpenILS/Utils/KCLSNormalize.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/KCLSNormalize.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/KCLSNormalize.pm index 65834b342b..7b12680daf 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/KCLSNormalize.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/KCLSNormalize.pm @@ -3,11 +3,15 @@ package OpenILS::Utils::KCLSNormalize; sub normalize_address_street { my ($street1, $street2) = @_; + $street1 = uc($street1) if $street1; + $street2 = uc($street2) if $street2; + # Replace 'AV' with 'AVE', but only when "AV" is surrounded by space # period, or end of line, so as not to clobber names that contain AV. if (my $s1 = $street1) { $s1 =~ s/\s+AV(\s|\.|$)+/ AVE /g; $s1 =~ s/\s+ST\.(\s|$)+/ ST /g; + $s1 =~ s/\s+STREET(\s|$)+/ ST /g; $s1 =~ s/(^\s*|\s*$)//g; # remove opening/trailing spaces $street1 = $s1; } -- 2.11.0