Validate String Using Regex In Python