5 ms·Regex pre-filter. You're welcome. re.sub(r'(?is)\b(?:honest|caveat|absolutely right)\b.*', '', text)by stldev 27d agoRegex pre-filter. You're welcome. re.sub(r'(?is)\b(?:honest|caveat|absolutely right)\b.*', '', text)