Quick problem.
A string of text is sent to me in the variable $message from another script on another server that I have no control over.
The first word of the string $message can be anywhere between 1 and 6 characters long. It is always a number
The string might be presented as
"15 message for joe"
or
" 120 message for david"
Therefore, there might be a space before the first word.
Can someone suggest a quick way of isolating the first number from the rest of the string. I want to end up with two strings... $number and $restofmessage
Thanks
Joe