Computer Science Canada formatting text file |
Author: | r0ssar00 [ Fri Sep 01, 2006 12:16 pm ] | ||||||
Post subject: | formatting text file | ||||||
i have a text file which has many many lines, but these lines have a specific format to them, each text section may contain anything except $ and #, which means spaces may be included
but the problem is, the last section after the last # can extend to multiple lines, i need a piece of code that will read through the file and have each line that starts with $ on its own line with all of the data for that item on the same line so given the data
it should look like this
each line beginning with $ is one line, everything that follows until the next $ is part of the same line |
Author: | r0ssar00 [ Fri Sep 01, 2006 12:18 pm ] |
Post subject: | |
forgot to mention one thing, where it says "it should look like this" i mean the final result when run through the algorithm the code should output to file thanks |