title: How to match numbers with decimal points
body: <p>I want to set two separate variables to two different numbers in a string.</p>
  
  <p>I used a string like "100,125" and I was able to get the two numbers, but once I changed the string to include decimals (like "100.172,125.181"), it would return the number after the decimal.</p>
  
  <pre class="lang-lua prettyprint-override"><code>local x, y = string.match("100,125", "(%d+),(%d+)")
  --this code works, making x = 100 and y = 125
  </code></pre>
  
  <p>however</p>
  
  <pre class="lang-lua prettyprint-override"><code>local x, y = string.match("100.134,125.122", "(%d+),(%d+)")
  --this did not work correctly
  </code></pre>
  
  <p>Using the latter method, I ended up with the variables x and y set to numbers after the decimals. I think I should reformat the string to something like "100.1x125.5" but I am not sure. thanks and sorry for the beginner question</p>