title: How to split a string based on either a colon or a hyphen?
body: <pre><code>a = '4-6'
  b= '7:10'
  </code></pre>
  
  <p>I have already tried</p>
  
  <pre><code>a.split('-')
  a.split(':')
  </code></pre>
  
  <p>how can i write code that can take in either string and get rid of both colons and hyphens? Is there a better way besides splitting the same string twice?</p>