i am trying to convert a string like
"test",645,23.4,42,"13,13,14","test"
into
"test","645","23.4","42","13,13,14","test"
i am trying with this code.
string pattern = "\",(? !\")";
string pattern2 = "(?<!\"),(? !\")";
string pattern3 = "(?<!\"),\"";
string replacement = "\",\"";
Regex rgx = new Regex(pattern);
catalogo = rgx.Replace(catalogo, replacement);
rgx = new Regex(pattern2);
catalogo = rgx.Replace(catalogo, replacement);
rgx = new Regex(pattern3);
catalogo = rgx.Replace(catalogo, replacement);
but i dont know how to get past the value that already contains commas. "13,13,14"
since it will change it into "13","13","14"
i dont know if thats the best way to convert the string, but at least i believe that it will do the job, just that i dont know why i get past this.