Hi, i got some problems with remove and split:
i have the outputs, as below:
{1 2} 3

How to remove the syimbol {} and split the 3 ?for example. it will become

1 2
3


anyone know? Please help me..

String original = "{1 2} 3";
String temp = original.Replace("{","").Replace("}","");
int pos = temp.LastIndexOf(' ');
String first = temp.Substring(0, pos);
String last = temp.Substring(pos+1);

Thanks for help, may i ask how to add those value to sortedlist?
In this case, 1 2 is key and 3 is the value of the sortedlistbut 3 must be as double.

sortedlist.Add(?,? );

I am currently studied in UMT and doing my final year project, lol

1 more question, how to convert last to double type? because my sortedlist is Dictionary<string,double>sortlist=new Dictionary<string,double>();

Excuse me, after I tried the codes, i found that the codes just can functioned for output {1 2} 3, let say, my output as below:
{1 2} 3
{1 2 6} 7
{1 3 4} 3
{1 5} 3

how to split?I want to split number after "}" because i want add the number as value into sortedlist and the numbers inside "{}" as keys in sortedlist.
Sorry if my question not clear.

This question has already been answered. Start a new discussion instead.