Alternatives

examples/regex/alternatives_in_regex.py
from __future__ import print_function
import re

strings = [
   'apple pie',
   'banana pie',
   'apple'
]

for s in strings:
    match = re.search(r'apple pie|banana pie', s)
    if match:
        print('Matched in', s)