Python, getting ValueError: unexpected '{' in field name when using format variable in a string with regex
Python, getting ValueError: unexpected '{' in field name when using format variable in a string with regex Question: This code runs a query on the string exactly as is it should. bInfoPList = re.findall(‘{searchString}’.format(searchString = searchString), content, re.M + re.S) This code returns: "ValueError: unexpected ‘{‘ in field name" bInfoPList = re.findall(‘{searchString}s*=s*{{[Pp]lainlist|.*’.format(searchString = searchString), content, …