Python Create Regex Pattern Meaning