Check String Against Regex In Python