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!