I'm no expert on this stuff and I have just been doing a bit of Googling. I think the function strcspn() would give you the index into the char array and then you could work your way along from that. Find the location of 'P' and get the next character and the next and the next
Thanks for replying Robin!
I also looked at that when googling to a solution.
With strcspn() you look to a for a match.
char str[] = "fcba73";
char keys[] = "1234567890";
int i;
i = strcspn (str,keys);
printf ("The first number in str is at position %d.\n",i+1);
return 0;