title: Get all words from string until certain word
body: <pre><code>$title = 'the.test.hd.part12';
  </code></pre>
  
  <p>Need all words up until it finds the word "part"</p>
  
  <p>Should return - <code>the.test.hd.</code></p>
  
  <p>Any help appreciated. Thank you.</p>