1# pip install regex
2import re
3# simple find all
4sample = "Nothing lasts... but nothing is lost"
5found = re.findall("thing", sample)
6print(found)
1re.search(r'cake$', "Cake! Let's eat cake").group()
2
3## The next search will return the NONE value, try it:
4re.search(r'cake$', "Let's get some cake on our way home!").group()
5