title: How to extract content of html tags from a string using javascript or angularjs?
body: <p>I have a string containing content in some html tags and also some text alone.</p>
  
  <p>It looks like this :</p>
  
  <pre><code>var str =  "&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;blabla&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;b&gt;blaaaaaablaaaaa&lt;/b&gt;&lt;/i&gt;&lt;/p&gt;&lt;iframe src="..." height="111" width="333"&gt;&lt;/iframe&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;sub&gt;hello blabla&lt;/sub&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;iframe src="..." height="444" width="888"&gt;&lt;/iframe&gt;"
  </code></pre>
  
  <p>I would like to extract somehow in Javascript or AngularJS only some tag (including <strong>content</strong> and <strong>attributes</strong>) then put them into an array.</p>
  
  <p>For example, if I want only <code>&lt;iframe&gt;</code> tag, I should have this :</p>
  
  <pre><code>var array = ["&lt;iframe src='...' height='111' width='333'&gt;&lt;/iframe&gt;", "&lt;iframe src='...' height='444' width='888'&gt;&lt;/iframe&gt;"];
  </code></pre>
  
  <p>If I want <code>&lt;p&gt;</code> tag then :</p>
  
  <pre><code>var array = ["", "&lt;i&gt;blabla&lt;/i&gt;","&lt;i&gt;&lt;b&gt;blaaaaaablaaaaa&lt;/b&gt;&lt;/i&gt;","","&lt;sub&gt;hello blabla&lt;/sub&gt;","&lt;br&gt;"];
  </code></pre>
  
  <p>Any suggestion ? Thanks !</p>
  
  <p><strong>NOTE :</strong> Don't give an answer <strong>using Jquery</strong> please !</p>