I have a list of short phrases that each should not be more than 5 word long, and I want to see if any of these phrases are in a certain text.

I want to write something like this:

```
my_phrases = ['Hello world', 'bye world', 'something something'....]
my_regex = re.compile('|'.join(my_phrases))

my_iter = re.finditer(my_regex, text)

```

But I'm kind of worried that this (line 2) is not considered a good practice. Can someone tell me if this is an OK thing to do? If not, what is the best way to match multiple phrases in text?