It is necessary to extract from the string, using regular expressions, all numbers (ie, 1 2 3, but not 1.1 or 14.14 - this is double) and all single letter characters (that is, a b in abc).
How to do this better, "\ d +" outputs a double, simply skipping a period, i.e. 14.14 it recognizes as 14 and 14. It does the same with the characters "\ w {1,1}", displays all characters, dividing the lines on individual characters.
\b- teranPattern p = Pattern.compile("(?U)(?<![0-9]\\.{0,1})[0-9]+(?!\\.?[0-9])|\b\\p{L}\\b");- Wiktor Stribiżew