title: How can I match single and double html attributes in regular expression?
body: <p>I have a html element with two different classes. but in some cases I have only one class. When there are two classes they are separated by space.</p>
  
  <pre><code>"rating-inbtn hide-if-zero-113"
   or 
  "rating-inbtn"
  </code></pre>
  
  <p>How can I match both patterns in regular expression.</p>
  
  <p>For reference I want to put an older post of mine :</p>
  
  <pre><code>&lt;span class="vote-actions"&gt;
      &lt;a class="btn btn-default vote-action-good"&gt;
          &lt;span class="icon thumb-up black black-hover"&gt;&amp;nbsp;&lt;/span&gt;
          &lt;span class="rating-inbtn"&gt;215&lt;/span&gt;
      &lt;/a&gt;
      &lt;a class="btn btn-default vote-action-bad"&gt;
          &lt;span class="icon thumb-down grey black-hover"&gt;&amp;nbsp;&lt;/span&gt;
          &lt;span class="rating-inbtn"&gt;82&lt;/span&gt;
      &lt;/a&gt;
  &lt;/span&gt;
  </code></pre>
  
  <p>and i was using this regular expression to extract the ratings</p>
  
  <pre><code>a = re.findall('rating-inbtn"&gt;(.*?)&lt;/span&gt;', webpage)
          like_count = a[0]
          dislike_count = a[1]
  </code></pre>
  
  <p>But sometimes span class have more than one attributes "hide-if-zero-113" in that case how can I handle this pattern?</p>
  
  <p>Thanks </p>