title: Regex Match all numbers and hyphen if hyphen is in between numbers
body: <pre><code>Example string: 80 http, 135 epmap, 139 netbios-ssn, 443 https, 445 microsoft-ds, 1433 ms-sql-server, 3389, 5985, 8530, 10123, 49000-49999, 50000-59999, 60000-65535, 61003, 62959
  </code></pre>
  
  <p>I want to remove all text and hyphens if the hyphen is surrounded by text and keep the hyphen if it is in a number range. If I use like ^0-9^- it will keep all hyphen, even if it is in a range. I can't figure out the correct syntax.</p>
  
  <pre><code>Outcome string example : 80, 135, 139, 443, 445, 1433, 3389, 5985, 8530, 10123, 49000-49999, 50000-59999, 60000-65535, 61003, 62959,
  </code></pre>