Use "\A \z", not "^ $" with Python regular expressions – Seth Larson | Heykuki News