Use strtol().
One of the things it returns is a pointer to where it got to (ie, the dots between numbers).
This you use to locate the start of the next number.