You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
privatestaticfinalPatterndigitsPatternExtended = Pattern.compile("(\\d+\\.?\\d*)(dozen|score|hundred|thousand|million|billion|trillion)?"); // this is really just second-guessing the tokenizer
91
+
privatestaticfinalPatterndigitsPatternExtended = Pattern.compile("((?:\\d+\\.?\\d*)|(?:\\.\\d+))(dozen|score|hundred|thousand|million|billion|trillion)?"); // this is really just second-guessing the tokenizer
// private static final Pattern[] endUnitWordsPattern = new Pattern[endUnitWords.length];
@@ -372,7 +372,7 @@ public static Number wordToNumber(String str) {
372
372
} else {
373
373
thrownewNumberFormatException("Bad number put into wordToNumber. Word is: \"" + curPart + "\", originally part of \"" + originalString + "\", piece # " + curIndex);
0 commit comments