title: Regex Digit seperated by , or - without number duplication and growing
body: <p>I'm looking for a regex which matches the following example : 1,2-5,7,10...</p>
  
  <p><strong>Description</strong> : Start with a number, and can optionally be followed by a sequence of "," or "-" with a digit after.</p>
  
  <p><strong>Restriction</strong> : Can't have a number with more than 4 digits.<br>
  Must start and end with a number.<br>
  Must not be containing the same number twice or more.<br>
  The numbers can't be smaller than the previous numbers (Example : 1,3-7,2 do not match)</p>
  
  <p>In fact I need a range regex.</p>
  
  <p>An example of data which can be entered : 1004,1032,1051,1062,1070,1092,1115,1136,1148,1164,1175,1180,1320,1332,1344,1350,‌​1368,1380,1386,1406,1414,1418,1428,1442,1448,1506,1524,1534,1550,1578,1584,1594,1‌​688,1708,1722,1750,1768,1772,1824,1853,4202-4205,8004,8180</p>
  
  <p>My regex solves some cases, but not the last two:
   (^(\d{1,4}))(([,-]\d{1,4})+)?</p>
  
  <p>Does someone have an idea of how to solve the last two cases ?</p>