@@ -, +, @@ matching rule with offset - define a matching rule on ISBN with length 0 and offset 999 (too big for any value) - import some MARC records with this matching rule - check the perl warns - edit the matching rule to set offset 0 - import some MARC records, with matching ISBN, with this matching rule --- C4/Matcher.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/C4/Matcher.pm +++ a/C4/Matcher.pm @@ -816,7 +816,9 @@ sub _get_match_keys { ); } - if ($component->{'length'}>0) { + if ( $component->{'offset'} > length($string) ) { + $string = ''; + } elsif ($component->{'length'}>0) { $string= substr($string, $component->{'offset'}, $component->{'length'}); } elsif ($component->{'offset'}) { $string= substr($string, $component->{'offset'}); --