title: Remove characters after string?
body: <p>I have strings that looks like this:</p>
  
  <pre><code>John Miller-Doe - Name: jdoe
  Jane Smith - Name: jsmith
  Peter Piper - Name: ppiper
  Bob Mackey-O'Donnell - Name: bmackeyodonnell
  </code></pre>
  
  <p>I'm trying to remove everything after the second hyphen, so that I'm left with:</p>
  
  <pre><code>John Miller-Doe
  Jane Smith
  Peter Piper
  Bob Mackey-O'Donnell
  </code></pre>
  
  <p>So, basically, I'm trying to find a way to chop it off right before "- Name:".  I've been playing around with substr and preg_replace, but I can't seem to get the results I'm hoping for... Can someone help?</p>