title: Leading space before a character in a string - count prefix space
body: <p>I have  a string</p>
  
  <pre><code>&amp;nbsp;&amp;nbsp;-123
  </code></pre>
  
  <p>I need to get 2 as count.</p>
  
  <pre><code>&amp;nbsp;&amp;nbsp;&amp;nbsp;-12&amp;&amp;nbsp;3
  </code></pre>
  
  <p>I need to get 4 as count. (in which case i want 3 ie. spaces before '-').</p>
  
  <p>The code i use is </p>
  
  <pre><code>stringValue.Count(countSpace =&gt; countSpace == ' ');
  </code></pre>
  
  <p>How do i pass a constraint check ie. "-" dash in this case and get the spaces before "-" dash and after "-".</p>