Regex basics in Python: match, search and validate one field with re
A practical first pass at regular expressions with Python's re module: the tokens you use every day, quantifiers, anchors, and the difference between search, match and fullmatch, ending with one pattern that safely validates an upload filename.