What would a Java regex tidier do? Here are some ideas: 1. remove nugatory \ quoting 2. convert \s*\s* --> \s* 3. alphabetise | lists. 4. remove (?:... ) that is not doing anything. 5. put [..] lists in canonical order. 6. Convert runs of 4+ to a-d notation. 7. use negative char lists when it would shorten the list.