What would a Java regex tidier do?\n\nHere are some ideas:\n\n1. remove nugatory \ quoting\n\n2. convert \s*\s* -\-> \s*\n\n3. alphabetise | lists.\n\n4. remove (?:... ) that is not doing anything.\n\n5. put [..] lists in canonical order.\n\n6. Convert runs of 4+ to a-d notation.\n\n7. use negative char lists when it would shorten the list.