title: Match everything but numbers regular expression
body: <p>I want to have a regular expression that match anything that is not a correct mathematical number. the list below is a sample list as input for regex:</p>
  
  <pre><code>1
  
  1.7654
  
  -2.5
  
  2-
  
  2.
  
  m
  
  2..3
  
  2....233..6
  
  2.2.8
  
  2--5
  
  6-4-9
  </code></pre>
  
  <p>So the first three (in <strong>Bold</strong>) should not get selected and the rest should.
  This is a close topic to <a href="https://stackoverflow.com/questions/2811031/decimal-or-numeric-values-in-regular-expression-validation">another post</a> but because of it's negative nature, it is different.</p>
  
  <p>I'm using R but any regular expression will do I guess.
  The following is the best shot in the mentioned post:</p>
  
  <pre><code>a &lt;- c("1", "1.7654", "-2.5", "2-", "2.", "m", "2..3", "2....233..6", "2.2.8", "2--5", "6-4-9")
  grep(pattern="(-?0[.]\\d+)|(-?[1-9]+\\d*([.]\\d+)?)|0$", x=a)
  </code></pre>
  
  <p>which outputs:</p>
  
  <pre><code>\[1\] 1  2  3  4  5  7  8  9 10 11
  </code></pre>