/* Collection of code snippets by Arne Vajhøj */
/* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main()
{
   char *streng = "hej40okds99";
   int tal1,tal2;
   int ix = 0;
   ix = ix + strspn(streng+ix,"0123456789");
   ix = ix + strcspn(streng+ix,"0123456789");
   tal1 = atoi(streng + ix);
   ix = ix + strspn(streng+ix,"0123456789");
   ix = ix + strcspn(streng+ix,"0123456789");
   tal2 = atoi(streng + ix);
   printf("%d %d\n",tal1,tal2);
   return 0;
}
