https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11046

--- Comment #20 from Marcel de Rooy <m.de.r...@rijksmuseum.nl> ---
Just a late observation about the last changes:

-    } elsif( $retval =~ m/(\d)[.Xx?]{3}|(\d\d)[.Xx?]{2}|(\d{3})[.Xx?]/ ) {
-        my $digits = $1 || $2 || $3;
-        $retval = $digits * ( 10 ** ( 4 - length($digits) ));
-    } elsif( $retval =~ m/(\d)[-]{3}\?|(\d\d)[-]{2}\?|(\d{3})[-]\?/ ) {
-        # the form 198-? occurred in Dutch ISBD rules
-        my $digits = $1 || $2 || $3;
+    } elsif( $retval =~ m/
+             (?<year>\d)[-]?[.Xx?]{3}
+            |(?<year>\d{2})[.Xx?]{2}
+            |(?<year>\d{3})[.Xx?]
+            |(?<year>\d)[-]{3}\?
+            |(?<year>\d\d)[-]{2}\?
+            |(?<year>\d{3})[-]\?
+    /xms ) { # the form 198-? occurred in Dutch ISBD rules

This part of the regex made me wonder:
             (?<year>\d)[-]?[.Xx?]{3}
What does the minus do here after the first digit? Do we allow 1-234 or so?
Looking at the above, this must have been a typo (copy/paste) after all..

Continued on bug 24674

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to