guys, thanks for the replies, i gave it a go and got partial success.
the problem is that the strtok deletes every occurance of a letter or number, i only want exact matches deleted.
otherwise its absolutely perfect
the is my attempt
Code:
#include <stdio.h>
#include <string.h>
//***reads input one character at a time from the input stream
// and puts into string called "uncoded"***//
char uncoded[BUFSIZ] = "#RAWWAASFRAMEA,COM1,9,68.0,SATTIME,1263,128186.000,000000000,58e4,1522,22,122,62,563456345dba43623443efdaef3245345fea325345626634623623c000,22*d04567cde";
//char uncodedraaw[BUFSIZ] = "#RAWWAASFRAMEA, COM1, COM2,00000000, 58e4, 122, 22";
char uncodedraaw[BUFSIZ] = "#RAWWAASFRAMEA, SATTIME, COM1";
// char *token;
char *decoded;
void main()
{
printf( "remaining data:\n" );
decoded = strtok( uncoded, uncodedraaw );
while( decoded != NULL )
{
/* While there are tokens in "string" */
printf( " %s", decoded );
/* Get next token: */
decoded = strtok( NULL, uncodedraaw );
}
}