title: Regex for Currency in jquery fro non decimal value
body: <pre><code>num.replace(/\B(?=(\d{2})+(?!\d))/g, ",")
  </code></pre>
  
  <p>The above regex is not working properly.</p>
  
  <p>ex-
  if value= 123456789
  result should be= 12,34,56,789</p>
  
  <p>if value= 12345678
  result should be= 1,23,45,678</p>
  
  <p>if value= 123456
  result should be= 1,23,456</p>
  
  <p>Please suggest.</p>