From: Jason Etheridge Date: Wed, 14 Sep 2016 13:59:42 +0000 (-0400) Subject: filter out linefeeds and carriage returns from holding tag values X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=commitdiff_plain;h=8e813de1f6497f0111286a2d751f9c543b4f2871 filter out linefeeds and carriage returns from holding tag values Signed-off-by: Jason Etheridge --- diff --git a/extract_holdings b/extract_holdings index f99b08d..619aec1 100755 --- a/extract_holdings +++ b/extract_holdings @@ -92,7 +92,7 @@ sub extract_holdings { for my $value ( @{$rec->{tags}[$holdidx]{multi}{$sub}} ) { my $fh = $MULTIFILE{"$tagid$sub"}; my $clean_value = $value; - $clean_value =~ s/\t//g; + $clean_value =~ s/[\r\n\t]//g; print $fh join("\t", $rec->{egid}, $j, $clean_value), "\n"; } } @@ -143,7 +143,7 @@ sub extract_holdings { for my $value ( @{$rec->{tags}[$tag_idx]{multi}{$sub}} ) { my $fh = $MULTIFILE{"$othertag$sub"}; my $clean_value = $value; - $clean_value =~ s/\t//g; + $clean_value =~ s/[\r\n\t]//g; print $fh normalize_output(join("\t", $rec->{egid}, $j, $clean_value)), "\n"; } }