title: Lose the last 3 chars from string variable
body: <p>if the last 4 chars in my string(result) are " AND" or the last three chars are " OR" I would like to remove these from the string. So far I have am trying result.trimend and a few other methods but am unsure how to get it working.</p>
  
  <p>Thanks</p>