my_string = "Value1=Product Registered;Value2=Linux;Value3=C:5;C++:5;Value4=43;"
I was using the following regex:
tokens = re.findall(r'([^;]+)=([^;]+)', line, re.I)
I need to parse value1, value2, etc and put their values into the database. For example, I need to store "C:5;C++:5" for value3 -- but by using the above regex I can only store C:5, because I parse based on ";". What would be a better way to do this?
Thanks!
;Value=fooit's undecidable. Or is there some constraint on the LHS and RHS?