turns out the inds in empty datafields won't ALWAYS be spaces
[migration-tools.git] / yaz-cleanup
index a6ebf60..fc08740 100755 (executable)
@@ -6,7 +6,7 @@ open NUMARC, '>', 'incoming.clean.marc.xml';
 $line1 = <MARC>;
 
 while ($line2 = <MARC>) {
-    if ($line1 =~ m/<datafield tag="..." ind1=" " ind2=" ">/) {
+    if ($line1 =~ m/<datafield tag="..." ind1="." ind2=".">/) {
         if ($line2 =~ m|</datafield>|) {
             $line1 = <MARC>;
             next;