title: Can somebody explain a money regex that just checks if the value matches some pattern?
body: <p><strong>There are multiple posts on here that capture value</strong>, but I'm just looking to check to see if the value is something. More vaguely put; I'm looking to understand the difference between checking a value, and "capturing" a value. In the current case the value would be the following acceptable money formats:</p>
  
  <p><a href="https://stackoverflow.com/questions/1028221/regex-for-money">Here is a post</a> that explains some about a money regex but I don't understand it a bit.</p>
  
  <pre><code>.50
  50
  50.00
  50.0
  $5000.00
  $.50
  </code></pre>
  
  <p>I don't want commas (people should know that's ridiculous).</p>
  
  <p>The thing I'm having trouble with are:</p>
  
  <ol>
  <li>Allowing for a $ at the starting of the value (but still optional)</li>
  <li>Allowing for only 1 decimal point (but not allowing it at the end)</li>
  <li>Understanding how it's working inside</li>
  <li>Also understanding out to get a normalized version (only digits and a the optional decimal point) out of it that strips the dollar sign.</li>
  </ol>
  
  <p>My current regex (which obviously doesn't work right) is:</p>
  
  <pre><code># I'm checking the Boolean of the following:
  re.compile(r'^[\$][\d\.]$').search(value)
  </code></pre>
  
  <p>(Note: I'm working in Python)</p>