You are probably mistaken. From what I am collecting, you start with a line, for example:
string = "test1, test2, test3, test4, test5"
Then you want to split it to save only meaningful substrings:
array = string.split(/, /)
And in the end, you only need all the elements except the first:
# We extract and remove the first element from array first_element = array.shift # Now array contains the expected result, you can check it with puts array.inspect
Is this the answer to your question?
bltxd Aug 26 '09 at 9:16 2009-08-26 09:16
source share