title: Money counter with Javascript and regex
body: <p>I have created a money counter with javascript using (/\d(?=(\d{3})+.)/g, "$&amp;,"); to format the money.
  This pulls through fine, but I want to add animation on every pound. The number will not always start on 00.</p>
  
  <p>So I have pulled through the code and have a "span" with the full amount eg £1,520,66.When the pound column goes up so £1,521.00 I want to add animation. But I have no idea how to target that specific number.
  the const below has the full number. So how canb i target the pound column?</p>
  
  <p>const counterAmount =<code>£</code> + jackpot.toFixed(2).replace(/\d(?=(\d{3})+.)/g, "$&amp;,");</p>