diff --git a/lib/DDG/Goodie/AnagramSolver.pm b/lib/DDG/Goodie/AnagramSolver.pm index d2221af6f..92ace3514 100644 --- a/lib/DDG/Goodie/AnagramSolver.pm +++ b/lib/DDG/Goodie/AnagramSolver.pm @@ -6,6 +6,8 @@ use DDG::Goodie; triggers start => "flargblarg"; handle remainder => sub { + # maybe just split input and then test for validity + # to make it more robust /^\s*([a-zA-Z]+)\s*([0-9]+)\s*$/; my $word = 0; $word = lc($1) if $1;