diff --git a/lib/commands/get.pm b/lib/commands/get.pm index eaccba7506f9d41a65a71ffc6972dd18bb159937..2273f0e66aabe9591e5b29e350c0d2898320c7b6 100644 --- a/lib/commands/get.pm +++ b/lib/commands/get.pm @@ -27,14 +27,15 @@ sub exec { my $req; my $rows; - my @words = ($msg =~ /(?:^| )([a-zA-Z0-9_-]+)/g); + my @words = ($msg =~ /(?:^| )([\S]+)/g); + print "@words"; if (not defined $last_req or $msg ne $last_req) { my $dbh = utils::db::get_session; my @words_param; - while ($msg =~ /(?:^| )([a-zA-Z0-9_-]+)/g) { - unshift @words_param, '%'.$1.'%'; + foreach (@words) { + unshift @words_param, '%'.$_.'%'; } my $words_sql;