string.sub() with patterns?

Hi! For a project I’m working on, I need to subtract a few unneeded words. I could just write a couple string.sub()'s to get rid of them, but the problem is I don’t know how many there are, since its a user choice. So is there a way with string.sub or another method to get rid of certain keywords? Here is an example: “like, the cat is like the best.” And since that’s not correct grammar, I want to remove the “likes” in that sentence. Any suggestions? Please let me know if you need further explaining.

Thanks,

Prynok

gsub(text,“like”,“”)

@Ignatz Thanks!