From 0ee9089a40879550a6a434621a63391d75714741 Mon Sep 17 00:00:00 2001 From: dbs Date: Sun, 26 Apr 2009 01:25:48 +0000 Subject: [PATCH] Improve the ID-matching regex Normalize to composed Unicode characters git-svn-id: svn://svn.open-ils.org/ILS/trunk@12986 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/extras/import/marc2sre.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/extras/import/marc2sre.pl b/Open-ILS/src/extras/import/marc2sre.pl index 83de43abdb..3687257e58 100755 --- a/Open-ILS/src/extras/import/marc2sre.pl +++ b/Open-ILS/src/extras/import/marc2sre.pl @@ -70,14 +70,14 @@ while ( try { $rec = $batch->next } otherwise { $rec = -1 } ) { # but we can work out call numbers later in SQL by the record ID + call number text if ($record_field) { $record = $record_field->data; - $record =~ s/(\d+)/$1/; + $record =~ s/^.*?(\d+).*?$/$1/o; } (my $xml = $rec->as_xml_record()) =~ s/\n//sog; $xml =~ s/^<\?xml.+\?\s*>//go; $xml =~ s/>\s+entityize($xml,'D'); + $xml = OpenILS::Application::AppUtils->entityize($xml); $xml =~ s/[\x00-\x1f]//go; my $bib = new Fieldmapper::serial::record_entry; -- 2.11.0