input with its cosmetic grouping stripped, for a digits-only charset where upper-casing would do nothing.
input
String compact(String input) => input.replaceAll(cosmeticSeparators, '');