title: replace last n parts after spliting on delimiter using sed or regex
body: <p>I need to replace last 2 parts of the string separated by delimiter with empty space to clean up the name.
  Example:</p>
  <pre><code>something-useful-a12356-78929
  </code></pre>
  <p>=&gt;</p>
  <pre><code>something-useful
  </code></pre>
  <pre><code>something-more-useful-v35f62-2728902
  </code></pre>
  <p>=&gt;</p>
  <pre><code>something-more-useful
  </code></pre>
  <p>I tried the following:</p>
  <pre><code>echo &quot;something-useful-12345-67890&quot; | sed -re 's/(-([0-9])+)//g'
  </code></pre>
  <p>This works if my last 2 elements of delimiter are numbers only, but wouldn't work for the example above. I need to remove the last 2 parts after splitting it on &quot;-&quot;
  I can only use sed or regex to solve this.</p>