Regex pre-filter. You're welcome.
re.sub(r'(?is)\b(?:honest|caveat|absolutely right)\b.*', '', text) re.sub(r'(?is)\b(?:honest|caveat|absolutely right)\b.*', '', text)No comments yet.