import re
search = 'please help me out'
fullstring = 'please help me out so that I could solve this'
s = re.search(search, fullstring)
print(s.group())
How to determine whether a substring is in a different string