Python Create Regex Pattern From String To Json