I would like to but I don't think `sre.compile` converts a parsed pattern back into text. For the current case the `pattern` attribute is set to `None`. I couldn't find a routine in `sre` to do this either.
Despite this drawback I still think this is better than the original version which parses regexes manually though as this covers a lot more corner cases.