import resubject = "ab-cd"subject = re.sub(r"([a-z])\-([a-z])", r"\1 \2", subject , 0, re.IGNORECASE | re.DOTALL) print subject
Standard input is empty
ab cd
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!