a)I have a text file that contains strings.each string has special characters($)that will come into play later
eg var1=/"this is a string.$mayavi$2001/"&var2=...etc..
&datacomplete=yes
I need to
a)capture these variables in an array say new primary();
b)detect the end of data in file.
c)split this primary array elements along the special characters and populate secondary arrays.
eg primary[0]="this is a string.$mayavi$2001" ;
text[0]="this is a string";
author[0]="mayavi";
year[0]="2001";
Well, for starters it looks like you need to use the split() function. Look at this code:
primary[0]="this is a string.$mayavi$2001" ;
splitPrimary = new Array();
splitPrimary = primary[0].split("$");
And then you have an array, splitPrimary, that has three values, [0] is "this is a string.", [1] is "mayavi", and [2] is "2001". You could then just write more code to assign these values to your other arrays.