How do I extract a substring from a string until the second space is encountered?

Posted by gbprithvi on Stack Overflow See other posts from Stack Overflow or by gbprithvi
Published on 2010-04-08T12:22:04Z Indexed on 2010/04/08 19:13 UTC
Read the original article Hit count: 336

Filed under:
|
|
|

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"?

The number of characters to be extracted are not the same always.. hence I want to extract until the second space is encountered.

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET