title: Using sed with two possible input formats
body: <p>I want to parse the repository from github, which comes in two formats:</p>
  
  <p>for ssh:</p>
  
  <p><code>Fetch URL: git@github.com:the/partIWant.git</code></p>
  
  <p>for https:</p>
  
  <p><code>Fetch URL: https://github.com/the/partIWant.git</code></p>
  
  <p>The command I use for ssh is: </p>
  
  <p><code>echo "Fetch URL: git@github.com:the/partIWant.git" | sed 's/.*://;s/.git$//'</code></p>
  
  <p>and for https:</p>
  
  <p><code>echo "Fetch URL: https://github.com/the/partIWant.git" | sed 's/.*https:\/\/github.com//;s/.git$//'</code></p>
  
  <p>How can I combine both, in order to parse correctly, regardless of the type?</p>