You can use ; to separate values, which simplifies working with it.
Since you have , for separation, as well as for values, it is difficult to break it down.
You have
string str = "param1,r:1234,p:myparameters=1,2,3"
Recommended use
string str = "param1;r:1234;p:myparameters=1,2,3"
which can be divided into
var strArray = str.Split(';'); strArray[0]; // contains param1 strArray[1]; // r:1234 strArray[2]; // p:myparameters=1,2,3
source share