import re print(re.sub(r"<(\w+)[^>]*>((?!<\/\1>).)*<\/\1>", r"@\1", input()))
<MUTATION value=123>123</MUTATION> has increased <EFFECT>something something</EFFECT>
@MUTATION has increased @EFFECT
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!