import re
pm = re.compile(r".*dog")
has = pm.match("i love dogasdf")
if has:
	print("dog at the end")
else:
	print("Not at the end")