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.
File.dat-->
some text(m1)
--> 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>
again some text(m2)
final output---> m1 (insert some text here) m2
Please reply fast,i need it urgently.