title: How to test input values using regex?
body: <p>I am working on one input application where i need to test input values that accepts single, multiple and even a range of numbers . </p>
  
  <pre><code>Eg inputs : 70,900,80-20 // should return true as all are valid
  as,@123 // should return false as it is not valid digit
  12-123-12123-123123 // should also return false
  </code></pre>
  
  <p>I am trying to use this in regex. I have tried this.</p>
  
  <pre><code>/^[\d,\-{1}]+/
  </code></pre>
  
  <p>I am not able to test using this regex. Let me know where i am doing wrong</p>