title: Java how to get specific words in a string (By using substring and indexOf)
body: <p>For example, I have the color of a shirt, the size&amp;the cost of it. All those informations are in 1 single string, e.g : </p>
  
  <blockquote>
    <p>"blue, small, 15, orange, large, 10, green, small, 5"</p>
  </blockquote>
  
  <p>How can I put all colors/sizes/cost into 1 each new string (String colors,sizes,cost) with <code>substring</code> and <code>indexOf</code>? The pattern is the same but I have no idea how to skip certain comma when I use <code>IndexOf("," , starting position)</code>.</p>
  
  <p>edit: Can't use split</p>