Python Create Regex Pattern Generator