0

Hi I have the following problem, where I am trying to delete the sentences that start with the word QUOTE and end with the word QUOTE. For example:

x=" QUOTEI think I am okayQUOTE I don't think you are"

I want the sentence to look like this: xx=" I don't think you are"

I have tried the following with gsub but unsucessfully:

x= c("QUOTEI think I am okayQUOTE I don't think you are")
xx= gsub("QUOTE*"," ",x)

The output of xx unfortunately is "I think I am okayQUOTE I don't think you are".

Thank you in advance.

Louise
  • 83
  • 5

0 Answers0