SethBartlett
Member
- Joined
- Dec 3, 2008
- Messages
- 6
- Programming Experience
- Beginner
I'm building a program that currently reads everything in a text file and outputs it to a textbox. Right now it uses StreamReader and does a ReadToEnd() and places that all in a string EntireFile. EntireFile outputs the data into a text file. So right now I basically made a basic text editor. What I need to do is figure out a way to seperate data and put it into different variables. I can deal with the data once it is placed in seperate variables, I just can't figure out a way to seperate the string. Here is an example file of what I'm trying to seperate.
So what I need to seperate are the vnums(The number after #) for each of them, also I need to seperate things that have a ~ after them. Basically each line would be a seperate variable to edit. So RoomName~ would be one variable(~ would be a delimeter). 99, 0 and 1 would be seperate. I just need to figure out how to seperate all these. Either when the program is reading the file or just reading it from the string EntireFile.
Also, I'd like to add that the extension of the file is technically .are (area file) but it can be read perfectly fine by a text file editor and is all text.
Thank You.
VB.NET:
#AREA Name New Area~
#MOBILES
#9900
MobsName~
MobDescrip~
LongDescription
~
the mob looks back at you!
~
64 0 0 S
75 0 0 0d0+0 0d0+0
0 0
8 8 1
#0
#ROOMS
#9900
RoomName~
Description Of Room
~
99 0 1
S
#0
#$
So what I need to seperate are the vnums(The number after #) for each of them, also I need to seperate things that have a ~ after them. Basically each line would be a seperate variable to edit. So RoomName~ would be one variable(~ would be a delimeter). 99, 0 and 1 would be seperate. I just need to figure out how to seperate all these. Either when the program is reading the file or just reading it from the string EntireFile.
Also, I'd like to add that the extension of the file is technically .are (area file) but it can be read perfectly fine by a text file editor and is all text.
Thank You.
Last edited: