Python Compile Regex Pattern