title: What does +(?!\d) in regex mean?
body: <p>I have also seen it as +$.</p>
  
  <p>I am using</p>
  
  <pre><code>$(this).text( $(this).text().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,") );
  </code></pre>
  
  <p>To convert 10000 into 10,000 etc.</p>
  
  <p>I think I understand everything else:</p>
  
  <ul>
  <li>(\d) - find number</li>
  <li>(?=\d{3}) - if followed by 3 numbers</li>
  <li>'+' - don't stop after first find</li>
  <li>(?!\d) - starting from the last number?</li>
  <li>/g - for the whole string</li>
  <li>,"$1," - replace number with self and comma</li>
  </ul>