title: Regex to accept numbers and/or number range separated by commas, but between range 1-4093
body: <p>I need a regex to validate  VLAN string entered by user. The string should allow numbers or ranges, separated by comma. The numbers must be between 1 and 4093.</p>
  
  <p>Below samples are allowed:</p>
  
  <pre><code>1,
  1,2,3,4
  1-10, 
  1-4093
  4000
  </code></pre>
  
  <p>I tried below : </p>
  
  <pre><code>^0*([1-9]|[1-8][0-9]|9[0-9]|[1-8][0-9]{2}|9[0-8][0-9]|99[0-9]|[1-3][0-9]{3}|40[0-8][0-9]|409[0-3])$  
  </code></pre>
  
  <p>Need to enhance for comma separated and ranges</p>