Regular expressions in Python (Jupyter notebook)