you should determine whether the character(s) ending
each apparent line are cr/lf or just lf (aka nl). that
character or those characters are what you split the
string on. you'll end up with a string array with 3 items
in it.
each line appears to be tab-separated, so that's what you
would use to split each line. you'll get a string array with 3
items in it. how you turn the array into a map depends on
which of the fields is your key and how you want to handle
the remaining 2 fields. mymap.put( key, value).
"then add to list". add what? i'll assume the map (mymap):
list.add(mymap)
basically:
dim mainarray() as string = regex.split( CRLF, mystring)
dim mymap
mymap initialize
for each line as string in mainarray
dim lilarray() as string = regex.split("\t",line)
for each item as string in lilarray
mymap.put( lilarray(0), lilarray(1) & "|" & lilarray(2) )
next
next
dim somelist as list
somelist.initialize
somelist.add(mymap)
if the original string uses "cr/lf" as the line separator, you'll have to
modify the first regex, otherwise you end up with a "cr" character
in each line. also, i assume the first field in each line is the map's
key. the second or third fields could be your key, but you still have
the issue of what you want to do with the other 2 fields. i concatenated
them for convenience.
once the map is populated, you add it to some list. this is how i read your
post.