I have a string such as "4 Tom Tim 6", and i am trying to scan those values with sscanf like this
sscanf(string, "%d %s %d", &NUMBER1, NAME, &number2 )

is there any way to do this and deposit in NUMBER1 the value 4, in NUMBER2 the value 6, and in NAME the value "Tom Tim"?

I tried but sscanf splits "Tom" and "Tim" because there is a whitespacew between them and thus it also returns a incorrect value for NUMBER2.

### Update:

Let me be more specific. There will always be a number at the beginning and at the end of the my string, and a substring between those numbers, which could have any length and any quantity of whitespaces, and what im trying to get is that substring in a single variable, and the numbers in the beggining and the end.