The goal of this question is to put a twist on this question. Your answer should be able to convert an array of words associated with integers into those integers. As an extra challenge, allow support for
_ in between numbers such as
one, twenty-two, eleven, thirty+five, forty eight =>
1, 22, 11, 35, 48.
ninety_two, eighty one, zero, seventy+seven, nine =>
92, 81, 0, 77, 9.
['five', 'twenty+eight', 'fifty_two', 'thirty', 'zero'] =>
[5, 28, 52, 30, 0]
- There are no negative numbers
- The applicable numbers only need to be
- The array will not be empty
As this is code-golf, let the answer with the fewest amount of bytes win. Good luck.