import re
patterns = ['that', 'this' ]
text = 'Does this text match the pattern?'
for pattern in patterns:
print('Looking for "%s" in "%s" ->' % (pattern, text),)
if re.search(pattern, text):
print ('found a match!')
else:
print ('no match')