This repository was archived by the owner on Oct 11, 2021. It is now read-only.

Description
If the only thing preventing two one-character alternatives from being merged is an alternative that cannot start with either characters (from the one-character alternatives), then it's safe to reorder the alternatives and merge the one-character alternatives.
Example:
(?:a|foo|b) == (?:a|b|foo) == (?:[ab]|foo)
I already added a util method that can detect the first character of an alternative, so this should be easy to implement.