title: escape characters with strtok
body: <p>Let's say that I have the following results from an external machine:</p>
  
  <pre><code>Value_1:(A=12.34, B=34.56, C=12.34, D=34.67)
  </code></pre>
  
  <p>I want with strtok to get these values so I have the following code which do exactly what I want</p>
  
  <pre><code>ptr = strtok(buff, "Value_,=A:B:C:D()");
           i = 0;
         while (ptr != NULL)
           {
            if (i == 0)
               strcat(out1, ptr); 
            if (i == 1)
               strcat(out2, ptr); 
            if (i == 2)
               strcat(out3, ptr); 
            if (i == 4)
               strcat(out4, ptr); 
            if (i == 6)
               strcat(out5, ptr); 
            ptr = strtok(NULL, "Value_,=A:B:C:D()");
            i++;
           }
        printf("Results: %s, %s, %s, %s, %s\n", out1, out2, out3, out4, out5); 
  </code></pre>
  
  <p>My question now is, if I have more or less variables as the following examples how can I improve my ptr variable to receive these different values of the variables?</p>
  
  <pre><code>Value_1:(A=12.34, B=34.56, C=12.34, D=34.67, E=50.68)
  Value_1:(A=12.34, B=34.56, C=12.34, D=34.67, E=43.96, F=12.45)
  Value_1:(A=12.34, B=34.56, D=34.67)
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>The solution is that I changed </p>
  
  <pre><code>ptr = strtok(buff, "Value_,=A:B:C:D()");
  </code></pre>
  
  <p>with a simple</p>
  
  <pre><code>ptr = strtok(buff, "Value_,=:()");
  </code></pre>