title: need a regex for 3 types of input
body: <p>I have been trying to get a regex which allows only input containing:</p>
  <p>[1. positive digit, 2. whitespace, 3. negative digit]</p>
  <p>for example</p>
  <pre><code>1 -2
  234 -453
  3454 -2
  </code></pre>
  <p>I tried</p>
  <pre><code>    input.matches(&quot;\\d+\\s\\d+&quot;) 
  </code></pre>
  <p>but i think it only allows positive numbers and I just cannot come up with condition for negative numbers.</p>