title: how to remove all text after the last recurrence of a certain character
body: <p>given any string, i want to remove any letters after a specific character.</p>
  
  <p>this character may exist multiple times in the string and i only want to apply this to the last occurrance.</p>
  
  <p>so lets say "/" is the character, here are some examples:</p>
  
  <p><a href="http://www.ibm.com/test" rel="noreferrer">http://www.ibm.com/test</a> ==> <a href="http://www.ibm.com" rel="noreferrer">http://www.ibm.com</a><br>
  hello/test ==> hello</p>