my @words = $*IN.words;
put 'part 1: ', @words.map({ .comb(/\d/)[0, *-1].join }).sum;
my @digit-words = <one two three four five six seven eight nine>;
my $rgx = /\d|@digit-words/;
my %digits = |(1..9), |@digit-words Z=> |(1..9), |(1..9);
put 'part 2: ', @words.map({ .match($rgx, :ov)[0, *-1].map({ %digits{.Str} }).join }).sum;