I have a string like this:
\"o1 1232.5467 1232.5467 1232.5467 1232.5467 1232.5467 1232.5467\"
How do I extract only \"o1 1232.5467\"
?>
You could try to find the indexOf "o1 " first. Then extract it. After this, Split the string using the chars "1232.5467":
string test = "o1 1232.5467 1232.5467 1232.5467 1232.5467 1232.5467 1232.5467";
string header = test.Substring(test.IndexOf("o1 "), "o1 ".Length);
test = test.Substring("o1 ".Length, test.Length - "o1 ".Length);
string[] content = test.Split(' ');