Is there a way to remove a certain word from a list of sentences if that word appears after a list of words?
For example, I want to remove the word "and" if "and" appears after a list of words ([ "red", "blue", "green"]
). I know how to remove a word if it appears after one particular word but is there a way to do the same for a list of words? A regular expression?