We already do something similar with strings, reducing '\x20' to ' ' (escodegen handles this for us automatically). It gets trickier with regular expressions, though, because we will need to avoid control characters such as [](){}-\. When expressed as \u????, these control characters can still be reduced to \x??.