Generalizations in lexicographic order of regexes