|
-
March 7th, 2010, 12:25 PM
#1
Best way to obtain value from string?
Hi, I'm looking to do some parsing of a string to obtain a value, but I'm unsure of the best way to get it.
For example, if my string is "You have XXX days remaining until the end of the world", how would I get the value of XXX? It will always be a number, but of unknown number of digits.
I was almost thinking of splitting based on the spaces, but I don't have confidence that the server will return a message with a consistent number of spaces every time.
Is there a quick way to do it with regular expressions or something?
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|