Regular expressions reverser for Python