import res = re.sub(r'(\b\w+)\s+\1', r'\1 <strong>\1</strong>', 'fly me to the the moon')print(s)
Standard input is empty
fly me to the <strong>the</strong> moon
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!