title: regex, period allowed, not comma
body: <p>Hi Im looking for a regex for</p>
  
  <p>Valid:</p>
  
  <pre><code>20000
  20.000
  </code></pre>
  
  <p>If a comma is used, it should not match with the comma and whats after.
  Not valid</p>
  
  <pre><code>20.000,12
  </code></pre>
  
  <p>Right now Im using:</p>
  
  <pre><code>([0-9]+([.][0-9]+)*)+?
  </code></pre>
  
  <p>But this one also takes the last 2 digits after comma.</p>
  
  <p><a href="https://i.stack.imgur.com/aaSll.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aaSll.png" alt="enter image description here"></a></p>