title: Remove specific HTML tag with its content from javascript string
body: <p>I have the following string variable and I want to remove all <code>a</code> tags with its content from the string.</p>
  
  <pre><code>var myString = "&lt;table&gt;&lt;tr&gt;&lt;td&gt;Some text ...&lt;a href='#'&gt;label...&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;";
  myString += "&lt;table&gt;&lt;tr&gt;&lt;td&gt;Some text ...&lt;a href='#'&gt;label...&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;";
  myString += "&lt;table&gt;&lt;tr&gt;&lt;td&gt;Some text ...&lt;a href='#'&gt;label...&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;";
  </code></pre>
  
  <p>I have checked this <a href="https://stackoverflow.com/questions/19632168/remove-html-content-groups-from-start-to-end-of-string-in-javascript">Remove HTML content groups from start to end of string in JavaScript</a> question's answers but it is for all tags.</p>
  
  <p>Thank you</p>