Removing all "H" within the strings, EXCEPT the ones including "CH"

Viewed 60

I am trying to remove all "H" within the strings, EXCEPT the ones including "CH" in the following example:

strings <- c("Cash","Wishes","Chain","Chip","Check")

I found that the code below remove only "H"

data<- gsub("H", "", strings)
1 Answers
Related