/scan word from file/
do
{
wordscan = fscanf(f, "%s", buffer);
if (wordscan != EOF)
{
if(strstr(buffer, filter))
{
temp = buffer;
charstart = strlen(strstr(temp, "file:/") - 1);
charend = strlen(temp);
printf("%s, %d\n", temp, charend);
}
}
} while (wordscan != EOF);
printf("File: %s is processed. \n", argv[i]);
/end code/
Hi, need some help regarding some issues in the above codes. I have managed to extract word from the file but I need only specific text from a long string eg href:/abc and I need only abc. I know the position of a as well as c.....I have tried using for loops to retrieve abc but it did not seems to work. What could possibly be wrong??
And is the code above looks alrite??
Thanks