Load a line of the file into a character buffer.
Use strstr(szBuffer, "from") to find the pointer to the "from" substring.
Add strlen("from") to the pointer.
This will give you the approximate location of the text you want.
Example - Untested, just banged it out. Some debugging may be required...
#include "stdio.h"
int main ()
{
FILE * pFile;
pFile = fopen ("myfile.txt", "r");
if (pFile==NULL)
return -1;
char szBuffer[65536];
while (fgets(szBuffer, sizeof(szBuffer), pFile))
{
char * pFromLoc = strstr(szBuffer, "from");
if (pFromLoc == NULL)
continue;
char *pNumberStart = pFromLoc + strlen("from");
int Number = atoi(pNumberStart);
printf("%d\n", Number);
}
fclose (pFile);
return 0;
}