What I have in mind is a text box that I could paste my turn report into, hit a button, have it parsed and then display it in an easier to read fashion. I'm ok with creating the nicer display and everything, I'm just trying to find an easier way to parse the text. My current report is over 1500 lines long and getting longer each turn. Here is a small snippet of my report so you can see what I'm working with :
Tax Regions: 4 (24)
Trade Regions: 6 (10)
Mages: 2 (2)
Errors during turn:
Dalesor Reavers (32264): MOVE: Unit has insufficient movement
points; remaining moves queued.
Events during turn:
Joss (377): Claims $100.
Mernic (1345): Claims $100.
Guards (6394): Gives 80 silver [SILV] to Fighters (6521).
That's just a small portion of the type of stuff I would be dealing with. I'm guessing it would be easiet to use indexOf() and split() but I'm a little lost as how to grab all the correct info. For example, under "Faction Status" there are only those three things, the only thing that would change is the numbers. The "Errors during turn" and "Events during turn" change constantly so how could make sure to grab all of the info each time and make sure that's all I'm grabing?
I'm sorry if this isn't making much sense, basically I just need to know the best way to parse large amounts of text. The book I have doesn't really cover it and I couldn't find anything too usefull through a google search. If anyone has any ideas I would really appreciate it.