Commands
# Import library
import re
# Search and match
m = re.search('(?<=abc)def', 'abcdef')
result = re.match(pattern, string)
# Split
re.split('\W+', 'Words, words, words.')
# Substitution
num = re.sub(r'\D', "", phone)
Tutorials
https://www.tutorialspoint.com/python/python_reg_expressions.htm https://docs.python.org/2/library/re.html