convert string to list of lists

I have a long string that represents animation frames. Each frame is delimited by $
within each frame is a information in the form of object:value delimited by *
for example:

s= object:valueobject:value$object:valueobject;value**

I’m trying to convert this string into new List.< >();
Is there an easy way to do this?

my current method is to split the frames first by $ then split the frameinfo by *
Then use a for loop to put the results into the generic lists…

function parseStringToLists(s:String){
			animation=new List.<List.<String> >();
			var framedata=Regex.Split(s,"\\*");

			for(var i=0;i<framedata.length;i++){
				var framestrings=Regex.Split(framedata*,"\\$");*
  •  		var framestringsList=new List.<String>();*
  •  			for(var k=0;k<framestrings.length;k++){*
  •  				framestringsList.Add(framestrings[k]);*
  •  			}*

_ animations*.Add(framestringsList);_
The Error I get is
> The best overload for the method*_
> ‘System.Collections.Generic.List…Add(String)’
> is not compatible with the argument list
> ‘(System.Collections.Generic.List.)’.

This line:


should be