I am looking for a regex solution to remove any words in the rest of the sentence after the occurrence of a key phrase.
Example
sentence = "The weather forecast for today is mostly sunny. The forecast for tomorrow will be rainy. The rest of the week..."
Key_phrase = "for tomorrow"
Desired output = "The weather forecast for today is mostly sunny. The forecast. The rest of the week..."
Attempt
head, sep, tail = sentence.partition(key_phrase)
print(head)
My idea is to first split the string into sentences, apply the above technique and then join the results. However, I feel like there must be a more elegant way to do this with regex?
Thanks for the help