title: Getting unique count based on patterns mattching SQL Server
body: <p>I wish to get unique count based on "classifyid" from the below mentioned string which is stored in SQL Server.</p>
  
  <p>The table "tblSomething" has one column "SomeText" which has values like:</p>
  
  <pre><code>Row 1:
  "&lt;span classifyid="11111"&gt;Test 11111&lt;/span&gt;
  &lt;span classifyid="12345"&gt;Test 22222&lt;/span&gt;
  &lt;span classifyid="11111"&gt;Test 33333&lt;/span&gt;"
  
  Row 2:
  "&lt;span classifyid="11111"&gt;Test 11111&lt;/span&gt;
  &lt;span classifyid="11111"&gt;Test 22222&lt;/span&gt;
  &lt;span classifyid="11111"&gt;Test 33333&lt;/span&gt;"
  
  I am expecting the output as:
  2 --    i.e. classifyid="11111" and classifyid="12345"
  1 --    i.e. classifyid="11111"
  </code></pre>
  
  <p>Any solution using SQL script, please advice.</p>