projects
/
migration-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(from parent 1:
dad3374
)
new edit check for 2+ chars in subfield code
author
Shawn Boyette
<sboyette@esilibrary.com>
Thu, 8 Jan 2009 20:00:11 +0000 (20:00 +0000)
committer
Shawn Boyette
<sboyette@esilibrary.com>
Thu, 8 Jan 2009 20:00:11 +0000 (20:00 +0000)
marc_cleanup
patch
|
blob
|
history
diff --git
a/marc_cleanup
b/marc_cleanup
index
7d09f27
..
d1479a4
100755
(executable)
--- a/
marc_cleanup
+++ b/
marc_cleanup
@@
-88,12
+88,16
@@
while ( buildrecord() ) {
# subfields can't be non-alphanumeric
if ($record[$ptr] =~ /<subfield code="(.*?)"/) {
- my $match = $1;
- if ($match =~ /\P{IsAlnum}/ or $match eq '') {
+ if ($1 =~ /\P{IsAlnum}/ or $1 eq '') {
edit("Junk in subfield code/Null subfield code");
next;
}
}
+ # subfields can't be non-alphanumeric
+ if ($record[$ptr] =~ /<subfield code="(\w{2,})"/) {
+ edit("Subfield code larger than 1 char");
+ next;
+ }
$ptr++;
}