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\"?>
\"o1 1232.5467\"
Just use String.IndexOf twice as in:
string str = "My Test String"; int index = str.IndexOf(' '); index = str.IndexOf(' ', index + 1); string result = str.Substring(0, index);