updating dewey extractor
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 15 Apr 2008 16:02:42 +0000 (16:02 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 15 Apr 2008 16:02:42 +0000 (16:02 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@9362 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/020.schema.functions.sql

index 8974c7e..0ba1add 100644 (file)
@@ -97,7 +97,7 @@ CREATE OR REPLACE FUNCTION public.call_number_dewey( TEXT ) RETURNS TEXT AS $$
        $txt =~ s/^\s+//o;
        $txt =~ s/[\[\]\{\}\(\)`'"#<>\*\?\-\+\$\\]+//o;
        $txt =~ s/\s+$//o;
        $txt =~ s/^\s+//o;
        $txt =~ s/[\[\]\{\}\(\)`'"#<>\*\?\-\+\$\\]+//o;
        $txt =~ s/\s+$//o;
-       if (/(\d{3}(?:\.\d+)?)/o) {
+       if ($txt =~ /(\d{3}(?:\.\d+)?)/o) {
                return $1;
        } else {
                return (split /\s+/, $txt)[0];
                return $1;
        } else {
                return (split /\s+/, $txt)[0];