Here's the situation:
I have a text file sitting on my unix with the following text:
name Eric
email eric@ericbarnhill.com
subject test
comment test
now I read this file with an
applet and it tokenizes it into:
nameString = "name Eric"
emailString = "email eric@ericbarnhill.com"
subjectString = "subject test"
commentString = "comment test"
that works ok, I checked it. now I want to parse this data and take off the labels so I can redisplay it. I write this code:
parsedName = nameString.substring(5);
parsedEmail = emailString.substring(6);
parsedSubject = subjectString.substring(8);
parsedComment = commentString.substring(8);
my plan is that I would get the four strings "Eric", "eric@ericbarnhill.com", "test", "test". But it's not working out that way. I get "me Eric", "il
eric@ericbarnhill.com", "ect test" and "ent test".
Thanks for reading my long post! Anyone know what I'm missing here?
Thanks
Eric