title: How to delete all text after and including delimiter in ruby
body: <p>I'm trying to do the following with a text document that I have:</p>
  
  <ol>
  <li>Import .txt file using ruby, split it by line, and push it to an array</li>
  <li>Remove all characters after and including a specific delimiter for all strings in the array</li>
  <li>Write each array element back to a new line in a new text file.</li>
  </ol>
  
  <p>I'm trying to do this using ruby and I've got step one working, but I can't get past step two. I'm stuck right now with an array of strings. Any help would be greatly appreciated. </p>