En este caso es conveniente utilizar
strpbrk y
strtod.
Código C:
Ver original#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(){
char str[] = "sad12### -34.5666xxxx 99.01 asdasd7asd";
char key[] = "0123456789-+.";
double x;
char *pEnd = str;
char *pStart
= strpbrk (pEnd
, key
); while(pStart){
if(pStart
!= pEnd
)printf("%f\n", x
); else pEnd++;
}
return 0;
}