Python Create Regex Pattern From String