title: How to use Split for string in Beanshell?
body: <p>I'm writing a Beanshell sampler in JMeter to read a file, in which I want to split each line by comma(,) and want to extract the values. I'm getting the first splitted string with index 0 but for next values with index 1, 2 and so... it is not giving the values.</p>
  
  <p><code>value = value.append(line.split(",")[2]);</code></p>
  
  <p>Here, for index 0 it is working all fine BUT for index more than 0, it fails.</p>