title: Ruby - How to split a string before specific keywords
body: <p>I want to split a string to get the substring before specific keywords or characters occur. e.g. Suppose special characters are <code>+</code> and <code>&amp;</code> and the word <code>"hello"</code>.</p>
  
  <p>So the strings <code>"He says hello to her"</code> and <code>"ten + three"</code> and <code>"the dog &amp; the cat"</code> should return:</p>
  
  <p><code>"He says"</code> and <code>"ten"</code> and <code>"the dog"</code>.</p>
  
  <p>I had been using <code>s.split(/[+,&amp;]/).first</code> but I can't figure out how to get the "hello" part.</p>