If I have a file(.txt) that i read in that contains the following :

*
[111]IPOD FOR SALE

   01 Jan 2012 in [1]Mobile by [325]se

   Submit
   |
   $300.00

[102]iphone

   11 Jan 2012 in [1]Mobile by [22]aa

   Submit
   |
   $600.00

 *

how do i extract the relevant data using strtok such that i only display

IPOD FOR SALE - 01 Jan 2012 - $300.00
iphone - 11 Jan 2012 - $600.00

as results?

What have you tried that didn't work?
You can see:
1) The package starts and ends with an asterisk ( * )
2) Each "record" begins with [nnn]

The rest of this would be removing carriage-returns/linefeeds and trimming extra spaces.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.