From: Ben Ostrowsky Date: Mon, 7 Mar 2011 18:15:48 +0000 (+0000) Subject: Some city/state data has no comma X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=commitdiff_plain;h=b92ef7c84d4fb13b28c63a138f4ab1ca67cff81c Some city/state data has no comma git-svn-id: svn://nox.esilibrary.com/migration-tools@725 eee7cc8d-164e-4af6-8e1b-092a69004917 --- diff --git a/unicorn/unicorn_patrons_to_tsv.pl b/unicorn/unicorn_patrons_to_tsv.pl index 640bed2..94c03dd 100755 --- a/unicorn/unicorn_patrons_to_tsv.pl +++ b/unicorn/unicorn_patrons_to_tsv.pl @@ -125,7 +125,7 @@ for (my $u = 0; $u < @records; $u++) { } $records[$u]{'l_' . $a . '_std_line1'} = $records[$u]{'USER_' . uc($a) . '.STREET'}; $records[$u]{'l_' . $a . '_std_line2'} = $records[$u]{'USER_' . uc($a) . '.LINE2'}; - if ((defined $records[$u]{'USER_' . uc($a) . '.CITY/STATE'}) && ($records[$u]{'USER_' . uc($a) . '.CITY/STATE'} =~ m/^(.*),(\s*)(.*)$/)) { + if ((defined $records[$u]{'USER_' . uc($a) . '.CITY/STATE'}) && ($records[$u]{'USER_' . uc($a) . '.CITY/STATE'} =~ m/^(.*),?(\s+)(.*)$/)) { $records[$u]{'l_' . $a . '_std_city'} = $1; $records[$u]{'l_' . $a . '_std_state'} = $3; }