chiark / gitweb /
If entry string is first word of a target string, don't regard it as ambiguous. ...
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Mon, 21 Sep 2009 01:09:53 +0000 (02:09 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Mon, 21 Sep 2009 01:09:53 +0000 (02:09 +0100)
yarrg/CommodsWeb.pm

index 24ee53e..adcff34 100644 (file)
@@ -160,7 +160,7 @@ sub dbw_lookup_string ($$$$$$$$) { # => ( $emsg, @dbresults )
     $each =~ s/^\s*//;  $each =~ s/\s*$//;  $each =~ s/\s+/ /g;
     my %m;
     my $results;
-    my @pats= ("$each", "$each\%", "\%$each\%");
+    my @pats= ("$each", "$each \%", "$each\%", "\%$each\%");
     if ($abbrev_initials) {
        push @pats, join ' ', map { "$_%" } split //, $each;
     }