title: Regex currency validation
body: <p>I need Help for currency regex in jQuery function.</p>
  
  <ul>
  <li>It optionally allows "$" sign only one time in beginning. </li>
  <li>It allows comma as digital-group-separator, but not in the beginning or the end.</li>
  <li>It allows only 2 digits rounded after decimal point.</li>
  <li>It allows only one decimal point and not in the beginning or the end.</li>
  </ul>
  
  <p><strong>Valid:</strong> </p>
  
  <pre><code>$1,530,602.24
  1,530,602.24
  </code></pre>
  
  <p><strong>Invalid:</strong> </p>
  
  <pre><code>$1,666.24$
  ,1,666,88,
  1.6.66,6
  .1555.
  </code></pre>
  
  <p>I tried <code>/^\$?[0-9][0-9,]*[0-9]\.?[0-9]{0,2}$/i</code>; it works fine except it matches <code>1,6,999</code>.</p>