From: Ben Ostrowsky Date: Wed, 26 May 2010 15:00:05 +0000 (+0000) Subject: Fixed a bug that could prevent name parsing in some cases. X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=commitdiff_plain;h=67a0e976a0dc1d9fba3216ee2ce0d5d320f90f70 Fixed a bug that could prevent name parsing in some cases. If the name includes an undotted abbreviation (Mrs, Jr) immediately followed by a comma, the previous version was removing the comma, which got in the way of parsing that name. git-svn-id: svn://nox.esilibrary.com/migration-tools@693 eee7cc8d-164e-4af6-8e1b-092a69004917 --- diff --git a/unicorn/unicorn_patrons_to_tsv.pl b/unicorn/unicorn_patrons_to_tsv.pl index 3f3d5e7..12b4371 100755 --- a/unicorn/unicorn_patrons_to_tsv.pl +++ b/unicorn/unicorn_patrons_to_tsv.pl @@ -175,7 +175,7 @@ for (my $u = 0; $u < @records; $u++) { } # Strip off a prefix, if there is one - foreach $prefix (qw( Ms. Mrs. Mr. Dr. )) { + foreach $prefix (qw( Ms\. Mrs\. Mr\. Dr\. )) { if ($temp_name =~ /$prefix /i) { $records[$u]{'l_prefix_name'} = $prefix; $temp_name =~ s/$prefix //i; @@ -183,7 +183,7 @@ for (my $u = 0; $u < @records; $u++) { } # Strip off a suffix, if there is one - foreach $suffix (qw( Jr. Sr. II III IV )) { + foreach $suffix (qw( Jr\. Jr Sr\. Sr II III IV )) { if ($temp_name =~ / $suffix/i) { $records[$u]{'l_suffix_name'} = $suffix; $temp_name =~ s/ $suffix//i;