roList Element

Having hard time on something. I have used roRegex split to separate a long string. According to the sdk this breaks the string into a roList. Well, the sdk for roList gives example of printing elements by using simple loop thru the index. It also shows you can use list[index number] to print specific element. I have tried the following based on the sdk but get errors.

This is from sdk to use split:


r =  CreateObject("roRegex", "/+", "")
r.Split(currentlocation)

So once this is done I should have a rolist called r made up of the elements from the split, which in this case is only 3 parts.
I have reference the sdk for the rolist below. I should able to loop thru the list and print all elements or use r

r is an roRegex, not an roList. r.Split() returns a list, it doesn’t change the roRegex into an roList. You need to do something like


list = r.Split(currentlocation)

Then you can iterate the list using your GetIndex code with “r” replaced by “list”, or simply


for each x in list
  print x
end for

–Mark

Thanks Markn, I was under the impression that the split created the list but I understand now.
Thanks