title: How to get a list of class names from html code?
body: <p>There is a javascript string that is a valid html code.
  What's the fastest way to get a javascript array that contains all classes grabbed from that string?</p>
  
  <pre><code>var mystr = '&lt;div class="class1 class2"&gt;&lt;p id="id1"&gt;some &lt;span class="class3"&gt;text about class="class4"&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;';
  </code></pre>
  
  <p>The expected result is</p>
  
  <pre><code>var myarr =  ["class1","class2","class3"];
  </code></pre>
  
  <p>Please unique classes only. The order in this array is not a matter.</p>