modules/math.pl: understand "ultimate question" a bit better

This commit is contained in:
Pragmatic Software 2020-01-18 11:41:49 -08:00
parent 20f767e2f2
commit 0da1e02da1
1 changed files with 2 additions and 2 deletions

4
modules/math.pl vendored
View File

@ -25,8 +25,8 @@ if ($#ARGV < 0)
$arguments = join(' ', @ARGV);
my $orig_arguments = $arguments;
$arguments =~ s/(the )*answer.*question of life(,? the universe,? and everything)?\s?/42/gi;
$arguments =~ s/(the )*meaning of (life|existence|everything)?/42/gi;
$arguments =~ s/(the )*(ultimate )*answer.*question of life(,? the universe,? and everything)?\s?/42/gi;
$arguments =~ s/(the )*(ultimate )*meaning of (life|existence|everything)?/42/gi;
if ($arguments =~ s/(\d+\s?)([^ ]+)\s+to\s+([^ ]+)\s*$/$1/) {
@conversion = ($2, $3);