Solutionunvalidated

String[] parts = test.split("((?<=\\))\\s*|(?<=\\d{1,}\\.\\d{2} (DR|CR)))"); — for (String test: tests){. Tension: You could add the case "... or split for any white space preceded by a parenthesis". Outcome: Your regex could be written like this:.

3c2fa0c7-24c5-463f-b84f-7c937754b513

String[] parts = test.split("((?<=\))\s*|(?<=\d{1,}\.\d{2} (DR|CR)))"); — for (String test: tests){. Tension: You could add the case "... or split for any white space preceded by a parenthesis". Outcome: Your regex could be written like this:.