I have a .dat file which has some 100 odd lines,i want to extract some 50 odd lines and put them in some memory (not a file) and the rest of the content in some other memory,like a buffer (again not in a file).The final output should have both the contents but some text must be inserted between them.There's also a field in .dat file which needs to be extracted and printed.
--> the 17 digit register no has to be extracted and printed ---
<tr style="FONT-FAMILY: Verdana; border: 1px #ffab00 solid; padding-right: 4px; empty-cells: show; "><td> Register no:12345678901234567</td></tr>
So, what exactly is your question: how to read a file (is it a text file that you want to read line by line?), how to find a specific piece of data in a string, ...? Have you written some code already yourself, and if yes, then where exactly do you get stuck - does it compile or not, does it run or not, do you get error messages? If yes, then what are the error messages? If you don't get an error message but it doesn't produce the output you expect, then how does what it actually does differ from what you expected?