'Replace a string that consists of an element surrounded by text

I want to replace this, a combination of element and text:

w<hi rend="superscript>ch

with this text string (eliminating the element):

which



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source