For these answers, I assume you have a string with parameter name and parameter value pairs formatted just as in your example, like 'param1=value1,param2=value2,param3=value3"
This is a general regex that will parse out the pairs of parameter name (=) parameter value into groups for each match
(?<=^|,)([^=]*)=([^,]*)(?=,\s?)
If you want a string out like this {'param1':'123','param2':'bb'}, you can run this replacement regex:
match expression: (?<=^|,)([^=]*)=([^,]*)(,?)
replace expression: '\1':'\2'\3
... then encapsulate all of that in curly brackets { and }... feed that into an eval statement, and you have a dictionary. (I have NEVER programmed python, but...) I believe you could do the following:
inputString = "param1=value1,param2=value2,param3=value3"
myParamDictionary = eval('{' + re.sub("(?<=^|,)([^=]*)=([^,]*)(,?)", "'\1':'\2'\3", inputString)
...but I have NEVER programmed in Python... python's flexibility seems like there might be a better way...
If you simply want an array with the names and values (not identified except by their indexes being even or odd), you could use this expression in a re.findall(regex, subject) statement:
(?<=^|,)([^=]*)|(?<==)([^,]*)
...this either will match the part after a comma (,) but before an equals sign (=) or it will match the part after an equals sign but before a comma. It will match zero-length names and values., so that the indexes can represent the type of data. To match only names or values with at least one character, use + instead of * - doing so may cause the indexes to be misaligned.