To split a pipe(|), comma(,), tab, space,…. separated string into multiple string values in ActionScript 3.0, you will have to use the split() method of String class. Below is short example where in a pipe(|) seperated string is broken up into multiple values and pushed into an array.
var cities:String = "Bombay|Los Angeles|Moscow|London|Rio de Janeiro|Sydney";
var citiesArray:Array = cities.split("|");
trace(citiesArray); //Result: Bombay,Los Angeles,Moscow,London,Rio de Janeiro,Sydney
how to split comma separation in a string in ActionScript
var citiesArray:Array = cities.split(“,”);
Whenever using a delimiter dont use something common such as a comma because a comma can be part of a name and when split it becomes 2 names… which is no intended… always use a very custom delimiter such as
~|~
or
this way you wont run into this common problem down the road when testing with complex data sets.