I'm trying to make a regex which can get everything until it finds some specific words, but if these words are not present in then text, the just grab everything, in this example let's consider our group of words: ['ABC', 'HIJ', 'TUV']
I have no ideia ABC about who i am
I have no ideia
I may have an idea about who you HIJ think you are
I may have an idea about who you
Sometimes i just wish you are not here
Sometimes i just wish you are not here
It finds everything until one of the words i defined, but if this word is not present like in the last string, then it gets everything.
My attempt:
(.*)(?:ABC|HIJ|TUV|$)
But it always get the entire string even when it has some of the words in the group.
P.S: I'm applying this in python