title: search by class in string javascript
body: <p>Let's suppose I have this string:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var myhtml= "&lt;html&gt;&lt;body&gt;&lt;div class='header'&gt;Welcome&lt;/div&gt;&lt;div class='news' id='new_1'&gt;Lorem ipsum....&lt;/div&gt;&lt;div class='news' id='new_2'&gt;dolor sit amet...&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;";</code></pre>
  </div>
  </div>
  </p>
  
  <p>Well, if this was on a normal website I could use "getElementsbyClassName" to get all elements with the class I want to select (In my case, "news").
  But... If it's like this case, when you have all the html in a variable, how can I get them? Is there a way to get all the divs with class is "news"?</p>