I'd like to remove all elements of a string after a certain keyword. Example :
this.is.an.example.string.that.I.have
Desired Output :
This.is.an.example
I've tried using gsub('string', '', list)
but that only removes the word string. I've also tried using the gsub('^string', '', list)
but that also doesn't seem to work.
Thank you.