title: Find and replace xml tags in html string in Perl with regex
body: <p>I need to find and replace xml tags inside html string which is not complete xml that's why I can not use xml parser to deal with it. So I need to manually find the xml tags and replace them with content inside these html strings.</p>
  
  <p>Example of html string containing the xml tags:</p>
  
  <pre><code>some text&lt;p&gt;hello p&lt;/p&gt;
  &lt;vars type="text" name="fname" age="64" style="&lt;b&gt;color='red'&lt;/b&gt;
  Class::SubClass-&gt;color" /&gt; other text or html open tags like &lt;p&gt;&lt;table&gt;&lt;tr&gt;
  </code></pre>
  
  <p>So I need to find the xml "vars" tags with their variable number of optional attributes and replace them with contents.</p>