I'm trying to change all HTML-looking tags in an input string if they are not valid HTML tags. By HTML-looking tags I mean a substring that is within <> brackets. For example, I would like to change
<p><em>This is an <example></em>. <strong>This is another</strong> <one>. <a href="[LINK]">test</a></p>
to
<p><em>This is an <example></em>. <strong>This is another</strong> <one>. <a href="[LINK]">test</a></p>
I'm doing this in Python. Thanks for your help!