From: Ian Jackson Date: Mon, 21 Sep 2009 01:09:53 +0000 (+0100) Subject: If entry string is first word of a target string, don't regard it as ambiguous. ... X-Git-Tag: 5.0^2~120 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.main.git;a=commitdiff_plain;h=2833d0fcda9aaf12852c490b4808579337246524 If entry string is first word of a target string, don't regard it as ambiguous. Fixes "nu" for "Nu island" --- diff --git a/yarrg/CommodsWeb.pm b/yarrg/CommodsWeb.pm index 24ee53e..adcff34 100644 --- a/yarrg/CommodsWeb.pm +++ b/yarrg/CommodsWeb.pm @@ -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; }