Hello
I have a list of data, which looks something like below
www.clickajob.co.uk%2Fprofiles%2F316%2F6%2F|a/TLT10911641168.google
www.ukdata.com%2Fcompany-listings%2FAd-16.html|a/TLT10911767856.google
I need to parse this data so i am left with
www.clickajob.co.uk|TLT10911641168.google
www.ukdata.com|TLT10911767856.google
Does anyone know how to help me? I have the following so far
if ( fp == NULL )
{
printf("Error opening %s\n", filename );
return(1);
}
printf("Sucessfully opened %s\n", filename );
while(fgets(string,sizeof(string), fp )!= NULL )
{
printf("Start = %s\n", string );
if( ptr = strtok(string,"%"))
{
memcpy(web,ptr,sizeof(web));
printf("web = %s\n", web );
if ( ptr = strtok(NULL,"|" ))
{
printf("ptr = %\n", ptr );
memcpy(Company,ptr,sizeof(Company));
printf("BURN = %\n", Company );
}
}
}