title: Regular Expression to find comma separated numbers python
body: <p>I have some HTML in which I want to find string which contains comma-separated number like</p>
  
  <p>871,174 Views (this could range from 1 to n with commas in it)</p>
  
  <p>I tried many for example </p>
  
  <pre><code>'(\d+(,d+)*)\sViews'
  </code></pre>
  
  <p>but can't make it work because when I run</p>
  
  <pre><code>re.findall(r'(\d+(,d+)*)\sViews', string)
  </code></pre>
  
  <p>, it gives </p>
  
  <pre><code>[('174', '')]
  </code></pre>
  
  <p>Actually I want to get the number.</p>
  
  <p>Edit 1:
  this is the string I'm passing to regex</p>
  
  <pre><code>&lt;span class="fcg"&gt;&lt;span id="fbPhotoPageCreatorInfo"&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="mbs fbPhotosAudienceContainerNotEditable" id="fbPhotoPageAudienceSelector"&gt;&lt;span class="mrs fbPhotosAudienceNotEditable fsm fwn fcg"&gt;Shared with:&lt;/span&gt;&lt;div class="_6a _29ee _3iio _20nn _43_1" data-hover="tooltip" aria-label="Public" data-tooltip-alignh="center"&gt;&lt;i class="img sp_e0NUBoHLxu_ sx_9486cc"&gt;&lt;/i&gt;&lt;span class="_29ef"&gt;Public&lt;/span&gt;&lt;/div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;span class="fcg"&gt;871,174 Views&lt;/span&gt;
  </code></pre>