import re
text_to_match = "This is a test string"
if re.match("string", text_to_match):
print("Matched 'string'")
elif re.match("This", text_to_match):
print("Matched 'This'")
else:
pring("No match")
aW1wb3J0IHJlCgp0ZXh0X3RvX21hdGNoID0gIlRoaXMgaXMgYSB0ZXN0IHN0cmluZyIKCmlmIHJlLm1hdGNoKCJzdHJpbmciLCB0ZXh0X3RvX21hdGNoKToKCXByaW50KCJNYXRjaGVkICdzdHJpbmcnIikKZWxpZiByZS5tYXRjaCgiVGhpcyIsIHRleHRfdG9fbWF0Y2gpOgoJcHJpbnQoIk1hdGNoZWQgJ1RoaXMnIikKZWxzZToKCXByaW5nKCJObyBtYXRjaCIp