Я хочу преобразовать слова, содержащие алфавитные символы, в репрезентативный номер в Java.
Например, four hundred four
должен оценивать число 404
.
Если буквы тарабарщиваются, как asdf
, то это ошибка.
Я знаю, что могу преобразовать голые символы в их эквивалентный эквивалент целых чисел, добавив их вместе, но я хочу, чтобы цифры, за исключением английских слов, были извлечены.